moved config into proxy package

This commit is contained in:
Benson Wong
2024-10-04 09:38:30 -07:00
parent 7475bf0fff
commit d061819fb1
3 changed files with 4 additions and 7 deletions

View File

@@ -6,7 +6,6 @@ import (
"net/http"
"os"
"github.com/mostlygeek/go-llama-cpp-proxy/config"
"github.com/mostlygeek/go-llama-cpp-proxy/proxy"
)
@@ -17,7 +16,7 @@ func main() {
flag.Parse() // Parse the command-line flags
config, err := config.LoadConfig(*configPath)
config, err := proxy.LoadConfig(*configPath)
if err != nil {
fmt.Printf("Error loading config: %v\n", err)
os.Exit(1)

View File

@@ -1,4 +1,4 @@
package config
package proxy
import (
"os"

View File

@@ -13,20 +13,18 @@ import (
"sync"
"syscall"
"time"
"github.com/mostlygeek/go-llama-cpp-proxy/config"
)
type ProxyManager struct {
sync.Mutex
config *config.Config
config *Config
currentCmd *exec.Cmd
currentModel string
currentProxy string
}
func New(config *config.Config) *ProxyManager {
func New(config *Config) *ProxyManager {
return &ProxyManager{config: config}
}