handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMetricsState

type AgentMetricsState struct {
	OrganizationID string               `json:"organization_id"`
	AgentType      string               `json:"agent_type"`
	AgentID        string               `json:"agent_id"`
	Status         string               `json:"status"`
	LastSeenAt     string               `json:"last_seen_at"`
	Metrics        agent.MetricsPayload `json:"metrics"`
}

type AgentStateRegistry

type AgentStateRegistry struct {
	// contains filtered or unexported fields
}

func NewAgentStateRegistry

func NewAgentStateRegistry() *AgentStateRegistry

func (*AgentStateRegistry) IsCurrent

func (registry *AgentStateRegistry) IsCurrent(organizationID string, agentType string, agentID string, generation int64) bool

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 (registry *AgentStateRegistry) MarkDisconnected(organizationID string, agentType string, agentID string, generation int64) bool

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 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
	AgentTokenSigningSecret []byte
	AgentStateRegistry      *AgentStateRegistry
	Edition                 edition.Provider
}

Jump to

Keyboard shortcuts

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