api

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentCertificateSigner

type AgentCertificateSigner interface {
	Sign(string, []byte, time.Time) (controlagent.IssuedCertificate, error)
}

AgentCertificateSigner issues the short-lived identity used by a paired cluster Agent.

type Config

type Config struct {
	Mode                            string
	PublicURL                       string
	CookieName                      string
	CookieSecure                    bool
	AllowedOrigin                   string
	AllowedHosts                    []string
	AllowedRegistries               []string
	TrustedProxyCIDRs               []string
	MaxReplicas                     int32
	MaxCPU                          int64
	MaxMemory                       int64
	SessionTTL                      time.Duration
	SessionIdleTTL                  time.Duration
	OperationLease                  time.Duration
	ParameterRetention              time.Duration
	ParameterMutationTimeout        time.Duration
	GitHubStateTTL                  time.Duration
	GitHubCookieName                string
	ObservabilityLogMaxWindow       time.Duration
	ObservabilityMetricMaxWindow    time.Duration
	ObservabilityEventMaxWindow     time.Duration
	ObservabilityLiveTTL            time.Duration
	ObservabilityLivePoll           time.Duration
	ObservabilityLivePerUser        int
	ObservabilityMetricsLivePoll    time.Duration
	ObservabilityMetricsLivePerUser int
	TOTPEnabled                     bool
	PublicDomain                    string
	PublicStatefulDomain            string
	PublicTCPEnabled                bool
	PublicTCPAddress                string
	PublicTCPMinimumPort            int32
	PublicTCPMaximumPort            int32
}

func DefaultConfig

func DefaultConfig() Config

func (Config) RegistryAllowed

func (c Config) RegistryAllowed(image string) bool

func (Config) Validate

func (c Config) Validate() error

type Dependencies

type Dependencies struct {
	Store                    *store.Store
	Logger                   *slog.Logger
	Tracer                   trace.Tracer
	GitHub                   githubapp.Service
	GitHubWebhookSecret      []byte
	ParameterSecrets         parameters.SecretValueStore
	SecretFingerprintKey     []byte
	PasswordResetKey         []byte
	AuthenticationSecrets    parameters.SecretValueStore
	HistoricalLogs           observability.HistoricalLogReader
	HistoricalMetrics        observability.HistoricalMetricReader
	HistoricalMetricBindings *historicalmetrics.Service
	HistoricalEvents         observability.HistoricalEventReader
	CurrentLogs              observability.CurrentLogReader
	CurrentMetrics           observability.CurrentMetricReader
	CurrentEvents            observability.CurrentEventReader
	ProviderInventory        providerbinding.Inventory
	AgentSigner              AgentCertificateSigner
	AgentServerCAPEM         []byte
	AgentTrustBundleID       string
}

Dependencies declares every external collaborator used by the HTTP API.

type Server

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

func NewServer

func NewServer(cfg Config, dependencies Dependencies) *Server

NewServer constructs a fully initialized API server from explicit dependencies.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Directories

Path Synopsis
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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