Documentation
¶
Overview ¶
Package racer composes the Racer controllers and replica observer. Constructors compose only; serving requires locally validated replicated state. Authority owns accepted state, server owns HTTPS serving, members owns workload discovery and builders, and wire owns protocol encoding.
Index ¶
- Constants
- func Run(ctx context.Context, cfg Config) error
- type Application
- type Config
- type KeyringReconciler
- type Replication
- func (r *Replication) AuthenticateReplica(ctx context.Context, request *http.Request) (string, time.Time, error)
- func (r *Replication) LeaderContext() (context.Context, bool)
- func (*Replication) NeedLeaderElection() bool
- func (r *Replication) PollInterval() time.Duration
- func (r *Replication) Start(ctx context.Context) error
- type TopologyReconciler
Constants ¶
const ReplicationAudience = authority.ReplicationAudience
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
Topology *TopologyReconciler
Keyring *KeyringReconciler
Server *server.Server
Lifecycle *server.Lifecycle
Replication *Replication
// contains filtered or unexported fields
}
func Assemble ¶
Assemble performs no Kubernetes calls, I/O, cryptography, or goroutine startup. c supplies indexed discovery (configured by SetupWithManager in production); reader must bypass the cache for authorization and durable-state validation.
func (*Application) Recover ¶
Recover runs the production startup guard before any manager runnable starts. The writer need not have a running cache; all reads use the authoritative reader supplied to Assemble. Constructors and recovery never grant serving authority.
func (*Application) SetupWithManager ¶
func (a *Application) SetupWithManager(mgr ctrl.Manager) error
type Config ¶
type Config struct {
Cluster wire.ClusterID
Namespace string
ControlAddress string
MetricsAddress string
ProbeAddress string
TLSCertificateFile string
TLSPrivateKeyFile string
PeerPort uint16
DataplaneServiceAccount string
DaemonSetName string
CredentialsSecretName string
VersionConfigMapName string
InstallationConfigMapName string
Limits server.Limits
Rotation authority.RotationPolicy
CertificateLifetime time.Duration
PodName string
PodUID string
ControllerServiceAccount string
ReplicationTokenFile string
ReplicationTrustFile string
ReplicationServerName string
ReplicationPort uint16
SnapshotMaxAge time.Duration
}
Config contains controller runtime settings, not operator workload inputs.
func ConfigFromLookup ¶
ConfigFromLookup parses the controller configuration without process-global state.
func LoadConfig ¶
LoadConfig reads deployment configuration. Initialization state is deliberately not an environment setting: it is read authoritatively on every recovery.
type KeyringReconciler ¶
type KeyringReconciler struct {
// contains filtered or unexported fields
}
func (*KeyringReconciler) SetupWithManager ¶
func (r *KeyringReconciler) SetupWithManager(mgr ctrl.Manager) error
type Replication ¶
type Replication struct {
Client client.Client
APIReader client.Reader
// contains filtered or unexported fields
}
Replication observes durable authority on every replica. No request from a dataplane performs these reads. Only the elected publisher supplies image bytes.
func (*Replication) AuthenticateReplica ¶
func (*Replication) LeaderContext ¶
func (r *Replication) LeaderContext() (context.Context, bool)
LeaderContext snapshots publisher lifetime and leadership under the same lock.
func (*Replication) NeedLeaderElection ¶
func (*Replication) NeedLeaderElection() bool
func (*Replication) PollInterval ¶
func (r *Replication) PollInterval() time.Duration
type TopologyReconciler ¶
type TopologyReconciler struct {
client.Client
APIReader client.Reader
// contains filtered or unexported fields
}
func (*TopologyReconciler) Reconcile ¶
func (r *TopologyReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile builds from the synchronized cache, reads the version ConfigMap authoritatively, commits counters/hashes with CAS, then installs the result. Conflicts requeue from fresh inputs; missing established counters fail closed.
func (*TopologyReconciler) SetupWithManager ¶
func (r *TopologyReconciler) SetupWithManager(mgr ctrl.Manager) error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package members derives deterministic membership candidates from observed Kubernetes values.
|
Package members derives deterministic membership candidates from observed Kubernetes values. |
|
Package server serves Racer HTTPS endpoints from locally validated authority.
|
Package server serves Racer HTTPS endpoints from locally validated authority. |
|
Package testutil provides workload fixtures for controller tests.
|
Package testutil provides workload fixtures for controller tests. |
|
Package wire declares Racer's HTTPS/JSON contracts.
|
Package wire declares Racer's HTTPS/JSON contracts. |
|
Package workload builds dataplane workloads.
|
Package workload builds dataplane workloads. |