Documentation
¶
Index ¶
- func WriteServiceResponse(response http.ResponseWriter, status int, value any, err error)
- type AgentMetricsState
- type AgentStateRegistry
- func (registry *AgentStateRegistry) IsCurrent(organizationID string, agentType string, agentID string, generation int64) bool
- func (registry *AgentStateRegistry) Latest(organizationID string, agentType string, agentID string) (AgentMetricsState, bool)
- func (registry *AgentStateRegistry) LatestByOrganizationAndType(organizationID string, agentType string) []AgentMetricsState
- func (registry *AgentStateRegistry) MarkConnected(organizationID string, agentType string, agentID string) int64
- func (registry *AgentStateRegistry) MarkDisconnected(organizationID string, agentType string, agentID string, generation int64) bool
- func (registry *AgentStateRegistry) UpdateMetrics(organizationID string, agentType string, agentID string, ...)
- func (registry *AgentStateRegistry) UpdateMetricsForConnection(organizationID string, agentType string, agentID string, generation int64, ...) bool
- type ControlRouteExtension
- type ControlRouteRegistry
- type ControlServer
- type ControlServerOptions
- type InternalRouteHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteServiceResponse ¶ added in v0.1.11
func WriteServiceResponse(response http.ResponseWriter, status int, value any, err error)
Types ¶
type AgentMetricsState ¶
type AgentStateRegistry ¶
type AgentStateRegistry struct {
// contains filtered or unexported fields
}
func NewAgentStateRegistry ¶
func NewAgentStateRegistry() *AgentStateRegistry
func (*AgentStateRegistry) Latest ¶
func (registry *AgentStateRegistry) Latest(organizationID string, agentType string, agentID string) (AgentMetricsState, bool)
func (*AgentStateRegistry) LatestByOrganizationAndType ¶
func (registry *AgentStateRegistry) LatestByOrganizationAndType(organizationID string, agentType string) []AgentMetricsState
func (*AgentStateRegistry) MarkConnected ¶
func (registry *AgentStateRegistry) MarkConnected(organizationID string, agentType string, agentID string) int64
func (*AgentStateRegistry) MarkDisconnected ¶
func (*AgentStateRegistry) UpdateMetrics ¶
func (registry *AgentStateRegistry) UpdateMetrics(organizationID string, agentType string, agentID string, metrics agent.MetricsPayload)
func (*AgentStateRegistry) UpdateMetricsForConnection ¶
func (registry *AgentStateRegistry) UpdateMetricsForConnection(organizationID string, agentType string, agentID string, generation int64, metrics agent.MetricsPayload) bool
type ControlRouteExtension ¶ added in v0.1.11
type ControlRouteExtension interface {
RegisterControlRoutes(registry ControlRouteRegistry)
}
type ControlRouteRegistry ¶ added in v0.1.11
type ControlRouteRegistry interface {
HandleInternal(pattern string, handler InternalRouteHandler)
ControlService() *service.ControlService
Edition() edition.Provider
}
type ControlServer ¶
type ControlServer struct {
// contains filtered or unexported fields
}
func NewControlServer ¶
func NewControlServer(options ControlServerOptions) *ControlServer
func (*ControlServer) ServeHTTP ¶
func (server *ControlServer) ServeHTTP(response http.ResponseWriter, request *http.Request)
type ControlServerOptions ¶
type ControlServerOptions struct {
TokenVerifier auth.InternalTokenVerifier
WebUserVerifier auth.WebUserTokenVerifier
RepositoryStore repo.UnitOfWork
ControlService *service.ControlService
InternalTokenTTL time.Duration
AppName string
ControlPlaneURL string
AgentReleaseVersion string
AgentTokenSigningSecret []byte
AgentStateRegistry *AgentStateRegistry
Edition edition.Provider
RouteExtensions []ControlRouteExtension
}
type InternalRouteHandler ¶ added in v0.1.11
type InternalRouteHandler func(http.ResponseWriter, *http.Request, service.InternalIdentity)
Click to show internal directories.
Click to hide internal directories.