api

package
v0.1.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
	WorkspaceNamespace              string
	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 Server

type Server struct {
	Store                 *store.Store
	Runtime               runtime.Client
	Config                Config
	Logger                *slog.Logger
	Tracer                trace.Tracer
	GitHub                githubapp.Service
	GitHubWebhookSecret   []byte
	ParameterSecrets      parameters.SecretValueStore
	SecretFingerprintKey  []byte
	PasswordResetKey      []byte
	AuthenticationSecrets parameters.SecretValueStore
	Observability         observability.Reader
	AgentSigner           interface {
		Sign(string, []byte, time.Time) (controlagent.IssuedCertificate, error)
	}
	// contains filtered or unexported fields
}

func NewServer

func NewServer(s *store.Store, r runtime.Client, cfg Config, logger *slog.Logger) *Server

func (*Server) Handler

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

func (*Server) RunOnce

func (s *Server) RunOnce(ctx context.Context, workerID string) (bool, error)

func (*Server) RunParameterMaintenanceOnce

func (s *Server) RunParameterMaintenanceOnce(ctx context.Context) (bool, error)

func (*Server) RunParameterMaintenanceWorker

func (s *Server) RunParameterMaintenanceWorker(ctx context.Context)

func (*Server) RunWorker

func (s *Server) RunWorker(ctx context.Context, workerID string)

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