api

package
v0.0.0-...-511e509 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 21 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() error

func Start

func Start(ctx context.Context, bus event.Bus, authSvc *auth.Service, auditor *auth.AuditLogger, limiter *auth.RateLimiter) error

Start launches Caesium's API.

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"`
}

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 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