Documentation
¶
Index ¶
- func Advertise(addr net.Addr, advertise string) (string, error)
- func AuthorityConfig(cfg cluster.Config, directory string) cm.Config
- func BootstrapImages(configs map[string]cluster.Config) (map[string][]byte, error)
- func ControlEndpoint(base string) (string, error)
- func GatewayDefault(o conf.GatewayOptions) string
- func GatewayURL(address string) (string, error)
- func IdentityHasRole(identity cluster.Identity, role string) bool
- func InstallBootstrap(cfg cluster.Config, directory string) error
- func MarshalConfig(cfg cluster.Config) ([]byte, error)
- func OwnListener(raw net.Listener) net.Listener
- func ParseProcessCommand(value string) ([]string, error)
- func ParseRaftMembers(value string) ([]cluster.ConsensusMember, error)
- func PublishDirectory(source, destination string) error
- func RegisterGateway(parent context.Context, gateway, key string, ...) func()
- func RegisterGatewayDynamic(parent context.Context, gateway, key string, ...) func()
- func ResolveBootstrap(cfg *cluster.Config, identityPath string)
- func RuntimeConfig(cfg cluster.Config, controlPath string, localEndpoint ...string) (raft.Config, func() error, error)
- func ServeListener(ctx context.Context, raw net.Listener, handler http.Handler) error
- type RecoveryMaterials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advertise ¶
Advertise resolves a service address and rejects an unadvertised wildcard listener.
func AuthorityConfig ¶
AuthorityConfig assembles the application WAL identity for fixed-member consensus.
func BootstrapImages ¶
BootstrapImages builds one initial durable voting image per physical identity.
func ControlEndpoint ¶
ControlEndpoint resolves the authenticated Meta control path.
func GatewayDefault ¶
func GatewayDefault(o conf.GatewayOptions) string
GatewayDefault selects the configured gateway or the local default.
func GatewayURL ¶
GatewayURL normalizes a gateway address, defaulting its scheme to HTTP.
func IdentityHasRole ¶
IdentityHasRole matches an explicitly granted identity role.
func InstallBootstrap ¶
InstallBootstrap consumes the one-time initial hard-state file before any election can start. Losing runtime state later enters quorum- certified recovery; it cannot silently recreate a voter with a blank term.
func MarshalConfig ¶
MarshalConfig validates a complete service identity before serializing it.
func OwnListener ¶
OwnListener wraps raw and owns every accepted connection, including WebSockets. The caller must close the returned listener.
func ParseProcessCommand ¶
ParseProcessCommand validates executable argv for real fencing or provisioning.
func ParseRaftMembers ¶
func ParseRaftMembers(value string) ([]cluster.ConsensusMember, error)
ParseRaftMembers validates the ID@URL@weight@priority material specification.
func PublishDirectory ¶
PublishDirectory atomically publishes an owned directory without replacing a target.
func RegisterGateway ¶
func RegisterGateway(parent context.Context, gateway, key string, registration clustergateway.Registration) func()
RegisterGateway renews a fixed service lease until its joined stop function is called.
func RegisterGatewayDynamic ¶
func RegisterGatewayDynamic(parent context.Context, gateway, key string, current func() clustergateway.Registration) func()
RegisterGatewayDynamic reads a fresh role and term for each renewal. Discovery advertises the authority's decision; it never elects a leader. The callback must return promptly and must be safe during runtime shutdown. The returned stop function cancels and joins the renewal goroutine.
func ResolveBootstrap ¶
ResolveBootstrap resolves a one-time voter image relative to its identity file.
Types ¶
type RecoveryMaterials ¶
type RecoveryMaterials struct {
ConfigPath, OutDir, Members, Journal string
}
RecoveryMaterials describes an offline replacement group without owning native databases.
func BindRecoveryFlags ¶
func BindRecoveryFlags(f *lfhflag.FlagSet) *RecoveryMaterials
BindRecoveryFlags binds the common material inputs to the owning command schema.