Documentation
¶
Overview ¶
Package api exposes the engine over HTTP: apply, diff, list, get, delete, status, the sealer public key, token auth, and a Gitea webhook that triggers a reconcile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sealer ¶
type Sealer interface{ PublicKey() string }
Sealer is the subset of *seal.Sealer the API needs.
type Server ¶
type Server struct {
Engine *engine.Engine
Source source.Source
State engine.State
Sealer Sealer
Logger *slog.Logger
// Trigger requests a full reconcile of the source (used by the webhook).
Trigger func()
// Auth (token-based; disabled when AuthEnabled is false).
AuthEnabled bool
AuthUser string
AuthPass string
AuthSecret []byte
AuthTTL time.Duration
WebhookSecret string
GitBranch string
// contains filtered or unexported fields
}
Server serves the CraneOps HTTP API.
func (*Server) ReconcileSource ¶
ReconcileSource loads the source and reconciles the whole desired set (with prune).
Click to show internal directories.
Click to hide internal directories.