moved config into proxy package
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/mostlygeek/go-llama-cpp-proxy/config"
|
|
||||||
"github.com/mostlygeek/go-llama-cpp-proxy/proxy"
|
"github.com/mostlygeek/go-llama-cpp-proxy/proxy"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ func main() {
|
|||||||
|
|
||||||
flag.Parse() // Parse the command-line flags
|
flag.Parse() // Parse the command-line flags
|
||||||
|
|
||||||
config, err := config.LoadConfig(*configPath)
|
config, err := proxy.LoadConfig(*configPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error loading config: %v\n", err)
|
fmt.Printf("Error loading config: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package config
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
@@ -13,20 +13,18 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mostlygeek/go-llama-cpp-proxy/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProxyManager struct {
|
type ProxyManager struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
|
|
||||||
config *config.Config
|
config *Config
|
||||||
currentCmd *exec.Cmd
|
currentCmd *exec.Cmd
|
||||||
currentModel string
|
currentModel string
|
||||||
currentProxy string
|
currentProxy string
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(config *config.Config) *ProxyManager {
|
func New(config *Config) *ProxyManager {
|
||||||
return &ProxyManager{config: config}
|
return &ProxyManager{config: config}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user