Documentation
¶
Overview ¶
Package serverapp wires and runs the Dexaflow control plane: the HTTP API, auth, metrics, and (when enabled) the scheduler. cmd/dexaflow-server is a thin caller of it (ADR 0099).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDatabaseReplaced = errors.New("the database was replaced under this process (another installation id, none, or no schema); " +
"exiting so no cache outlives the old database: the restart waits, not ready, until the right database is back or this one is accepted with installation.id")
ErrDatabaseReplaced stops a running server whose readiness probe found another installation's database, or none, under it.
Functions ¶
func LogEnvCompat ¶
LogEnvCompat reports the result of mirroring the environment: every conflicting pair (the DEXAFLOW_* value won) and, in one line, how many variables are set only under their LEOFLOW_* names, which keep working.
func Run ¶
Run builds every component and serves until ctx is done. A nil opts.Config is loaded the way the binary loads it: the config file named by DEXAFLOW_CONFIG (or LEOFLOW_CONFIG), then the environment. Its error maps to the process exit code through ExitCode.
func VersionOutput ¶
func VersionOutput() string
VersionOutput is what `dexaflow-server version` prints: the version line every existing parser reads ("<name> <version> ..."), then the capabilities. It is answered before any config is loaded, so probing a binary never boots it.
Types ¶
type Options ¶
type Options struct {
// Config is the configuration to run with. Nil loads it the way the
// binary does.
Config *config.ServerConfig
// ConfigFile, when set and Config is nil, is the config file to read in
// place of the one DEXAFLOW_CONFIG names. The environment still applies
// on top of it.
ConfigFile string
// AdmissionHooks run before the configured webhook, in this order
// (ADR 0100 §6).
AdmissionHooks []admission.Hook
// LogSink, when set, stores task logs in place of the sink logs.backend
// would build (ADR 0099 §3). The caller owns it: the server never closes
// it.
LogSink logs.Sink
// XComBackend, when set, stores XCom values in place of Redis or the
// embedded Postgres store (ADR 0099 §3). Redis, when configured, still
// serves the live log tail. The caller owns the backend.
XComBackend xcom.Backend
// UIServer, when set, is served in place of the embedded SPA (ADR 0099
// §3).
UIServer api.UIServer
// Authenticator, when set, checks the request tokens the engine's own
// authenticator does not recognize and takes password sign-in (ADR 0099
// §3, §6).
Authenticator auth.Authenticator
// TrustedIssuer, when set, verifies trusted-issuer handoffs posted from
// TrustedIssuerOrigins in place of auth.trusted_issuer, which must then be
// empty.
TrustedIssuer api.TrustedIssuer
TrustedIssuerOrigins []string
}
Options are the components a caller of pkg/server supplies instead of, or next to, the ones the configuration builds.
Source Files
¶
- admission.go
- api_tokens.go
- api_wiring.go
- auth_options.go
- bootstrap.go
- ci_oidc.go
- dispatch.go
- grpc_wiring.go
- http_tls.go
- installation.go
- k8s.go
- keylock.go
- leader.go
- maintenance.go
- migrate_on_boot.go
- policies.go
- recovery_hint.go
- run.go
- schema_wait.go
- secrets.go
- startup_timeouts.go
- tls_guard.go
- usage_metrics.go
- usage_switch.go
- warm.go
- warnings.go