clusterruntime

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Advertise(addr net.Addr, advertise string) (string, error)

Advertise resolves a service address and rejects an unadvertised wildcard listener.

func AuthorityConfig

func AuthorityConfig(cfg cluster.Config, directory string) cm.Config

AuthorityConfig assembles the application WAL identity for fixed-member consensus.

func BootstrapImages

func BootstrapImages(configs map[string]cluster.Config) (map[string][]byte, error)

BootstrapImages builds one initial durable voting image per physical identity.

func ControlEndpoint

func ControlEndpoint(base string) (string, error)

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

func GatewayURL(address string) (string, error)

GatewayURL normalizes a gateway address, defaulting its scheme to HTTP.

func IdentityHasRole

func IdentityHasRole(identity cluster.Identity, role string) bool

IdentityHasRole matches an explicitly granted identity role.

func InstallBootstrap

func InstallBootstrap(cfg cluster.Config, directory string) error

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

func MarshalConfig(cfg cluster.Config) ([]byte, error)

MarshalConfig validates a complete service identity before serializing it.

func OwnListener

func OwnListener(raw net.Listener) net.Listener

OwnListener wraps raw and owns every accepted connection, including WebSockets. The caller must close the returned listener.

func ParseProcessCommand

func ParseProcessCommand(value string) ([]string, error)

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

func PublishDirectory(source, destination string) error

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

func ResolveBootstrap(cfg *cluster.Config, identityPath string)

ResolveBootstrap resolves a one-time voter image relative to its identity file.

func RuntimeConfig

func RuntimeConfig(cfg cluster.Config, controlPath string, localEndpoint ...string) (raft.Config, func() error, error)

RuntimeConfig creates authenticated Raft peers and their shared transport closer.

func ServeListener

func ServeListener(ctx context.Context, raw net.Listener, handler http.Handler) error

ServeListener owns all accepted connections, including WebSocket upgrades which net/http.Shutdown intentionally leaves open.

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.

func (*RecoveryMaterials) Build

func (c *RecoveryMaterials) Build(alias, selfEndpoint string, out io.Writer) error

Build validates and atomically publishes a new group and its one-time voting images. Every original voter must already be stopped or isolated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL