api

package
v0.0.0-...-1874338 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Health

func Health(c *echo.Context) error

Health is used to determine if Caesium is healthy.

func RegisterUI

func RegisterUI(e *echo.Echo)

func Shutdown

func Shutdown(ctx context.Context) error

func Start

func Start(ctx context.Context, bus event.Bus, authSvc *auth.Service, auditor *auth.AuditLogger, limiter *auth.RateLimiter, sessions *auth.SessionStore, sso *auth.SSOService, providers SSOProviders, wakeupHandler InternalWakeupHandler) error

Start launches Caesium's API.

The run-owner coordination endpoints (/internal/dispatch, /internal/complete) are deliberately NOT served here — they live on a dedicated mutually authenticated TLS listener (see dispatch.InternalServer) so the public API can remain plain HTTP behind the operator's proxy.

Types

type CheckResult

type CheckResult struct {
	Status    Status `json:"status,omitempty"`
	LatencyMs int64  `json:"latency_ms,omitempty"`
	Count     int64  `json:"count,omitempty"`
}

CheckResult describes the outcome of an individual health check.

type HealthChecks

type HealthChecks struct {
	Database   *CheckResult `json:"database"`
	ActiveRuns *CheckResult `json:"active_runs"`
	Triggers   *CheckResult `json:"triggers"`
	Nodes      *CheckResult `json:"nodes"`
}

HealthChecks holds all dependency check results.

type HealthResponse

type HealthResponse struct {
	Status Status        `json:"status"`
	Uptime time.Duration `json:"uptime"`
	Checks *HealthChecks `json:"checks,omitempty"`
}

HealthResponse defines the data the Health REST endpoint returns.

type InternalWakeupHandler

type InternalWakeupHandler func(ctx context.Context, id string, ttl int)

type SSOProviders

SSOProviders holds SSO providers that are mounted by the API.

type Status

type Status string

Status enumerates the health statuses of Caesium.

const (
	Healthy  Status = "healthy"
	Degraded Status = "degraded"
)

Jump to

Keyboard shortcuts

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