mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
25 lines
435 B
Go
25 lines
435 B
Go
package server
|
|
|
|
import (
|
|
"llamactl/pkg/config"
|
|
"llamactl/pkg/manager"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
type Handler struct {
|
|
InstanceManager manager.InstanceManager
|
|
cfg config.AppConfig
|
|
httpClient *http.Client
|
|
}
|
|
|
|
func NewHandler(im manager.InstanceManager, cfg config.AppConfig) *Handler {
|
|
return &Handler{
|
|
InstanceManager: im,
|
|
cfg: cfg,
|
|
httpClient: &http.Client{
|
|
Timeout: 30 * time.Second,
|
|
},
|
|
}
|
|
}
|