management

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRespondToStatic

func NewRespondToStatic() http.Handler

Types

type Client

type Client struct {
	HttpClient                    *http.Client
	ManagementServerConfiguration *ManagementServerConfiguration
}

func (*Client) ReportLlamaCppSlotsAggregatedStatus added in v0.7.0

func (self *Client) ReportLlamaCppSlotsAggregatedStatus(
	ctx context.Context,
	serverEventsChannel chan<- goroutine.ResultMessage,
	llamaCppConfiguration *llamacpp.LlamaCppConfiguration,
	llamaCppSlotsAggregatedStatus *llamacpp.LlamaCppSlotsAggregatedStatus,
	llamaCppTargetId string,
	llamaCppTargetName string,
)

type ManagementServerConfiguration

type ManagementServerConfiguration struct {
	EnableDashboard bool
	HttpAddress     *netcfg.HttpAddressConfiguration
}

type RegisterTargetRequest

type RegisterTargetRequest struct {
	LlamaCppSlotsAggregatedStatus *llamacpp.LlamaCppSlotsAggregatedStatus   `json:"llama_cpp_slots_aggregated_status"`
	LlamaCppTargetConfiguration   *loadbalancer.LlamaCppTargetConfiguration `json:"llama_cpp_target_configuration"`
	PaddlerAgentName              string                                    `json:"paddler_agent_name"`
}

type RespondToDashboard

type RespondToDashboard struct {
	DashboardTemplates  *template.Template
	LoadBalancer        *loadbalancer.LoadBalancer
	ServerEventsChannel chan<- goroutine.ResultMessage
}

func NewRespondToDashboard

func NewRespondToDashboard(
	loadBalancer *loadbalancer.LoadBalancer,
	serverEventsChannel chan<- goroutine.ResultMessage,
) (*RespondToDashboard, error)

func (*RespondToDashboard) ServeHTTP

func (self *RespondToDashboard) ServeHTTP(response http.ResponseWriter, request *http.Request)

type RespondToDashboardTemplateProps

type RespondToDashboardTemplateProps struct {
	LlamaCppTargets    []*loadbalancer.LlamaCppTarget
	LoadBalancerStatus *loadbalancer.LoadBalancerStatus
}

type RespondToHealth

type RespondToHealth struct {
	LoadBalancer        *loadbalancer.LoadBalancer
	ServerEventsChannel chan<- goroutine.ResultMessage
}

func (*RespondToHealth) ServeHTTP

func (self *RespondToHealth) ServeHTTP(response http.ResponseWriter, request *http.Request)

type RespondToRegisterTarget

type RespondToRegisterTarget struct {
	LoadBalancerTargetRegistrar *loadbalancer.LoadBalancerTargetRegistrar
	ServerEventsChannel         chan<- goroutine.ResultMessage
}

func (*RespondToRegisterTarget) ServeHTTP

func (self *RespondToRegisterTarget) ServeHTTP(response http.ResponseWriter, request *http.Request)

type RespondToRegisteredAgents added in v0.9.0

type RespondToRegisteredAgents struct {
	LoadBalancerTargetCollection *loadbalancer.LoadBalancerTargetCollection
	ServerEventsChannel          chan<- goroutine.ResultMessage
}

func (*RespondToRegisteredAgents) ServeHTTP added in v0.9.0

func (self *RespondToRegisteredAgents) ServeHTTP(response http.ResponseWriter, request *http.Request)

type Server

type Server struct {
	ManagementServerConfiguration *ManagementServerConfiguration
	Logger                        hclog.Logger
	RespondToDashboard            http.Handler
	RespondToHealth               http.Handler
	RespondToRegisterTarget       http.Handler
	RespondToStatic               http.Handler
	RespondToRegisteredAgents     http.Handler
}

func (*Server) Serve

func (self *Server) Serve(serverEventsChannel chan<- goroutine.ResultMessage)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL