Documentation ¶
Index ¶
- Variables
- func NewAgentBootstrapper(server, token, dataDir string) routing.Bootstrapper
- func NewChainingBootstrapper(bootstrappers ...routing.Bootstrapper) routing.Bootstrapper
- func NewSelfBootstrapper() routing.Bootstrapper
- func NewServerBootstrapper(controlConfig *config.Control) routing.Bootstrapper
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( P2pAddressAnnotation = "p2p." + version.Program + ".cattle.io/node-address" P2pEnabledLabel = "p2p." + version.Program + ".cattle.io/enabled" P2pPortEnv = version.ProgramUpper + "_P2P_PORT" )
View Source
var DefaultRegistry = &Config{ Bootstrapper: NewSelfBootstrapper(), HandlerFunc: func(_ *Config, _ *mux.Router) error { return errors.New("not implemented") }, AuthFunc: func() authenticator.Request { return union.New(nil) }, }
DefaultRegistry is the default instance of a Spegel distributed registry
Functions ¶
func NewAgentBootstrapper ¶
func NewAgentBootstrapper(server, token, dataDir string) routing.Bootstrapper
NewAgentBootstrapper returns a p2p bootstrapper that retrieves a peer address from its server
func NewChainingBootstrapper ¶
func NewChainingBootstrapper(bootstrappers ...routing.Bootstrapper) routing.Bootstrapper
NewChainingBootstrapper returns a p2p bootstrapper that passes through to a list of bootstrappers.
func NewSelfBootstrapper ¶
func NewSelfBootstrapper() routing.Bootstrapper
NewSelfBootstrapper returns a stub p2p bootstrapper that just returns its own ID
func NewServerBootstrapper ¶
func NewServerBootstrapper(controlConfig *config.Control) routing.Bootstrapper
NewServerBootstrapper returns a p2p bootstrapper that returns an address from a random other cluster member.
Types ¶
type Config ¶
type Config struct { ClientCAFile string ClientCertFile string ClientKeyFile string ServerCAFile string ServerCertFile string ServerKeyFile string // ExternalAddress is the address for other nodes to connect to the registry API. ExternalAddress string // InternalAddress is the address for the local containerd instance to connect to the registry API. InternalAddress string // RegistryPort is the port for the registry API. RegistryPort string // PSK is the preshared key required to join the p2p network. PSK []byte // Bootstrapper is the bootstrapper that will be used to discover p2p peers. Bootstrapper routing.Bootstrapper // HandlerFunc will be called to add the registry API handler to an existing router. HandlerFunc handlerFunc // Authenticator will be called to retrieve an authenticator used to validate the request to the registry API. AuthFunc authFunc }
Config holds fields for a distributed registry
func (*Config) InjectMirror ¶
InjectMirror configures TLS for the registry mirror client, and adds the mirror address as an endpoint to all configured registries.
Click to show internal directories.
Click to hide internal directories.