Documentation
¶
Overview ¶
Package metadata contains the container metadata server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultServerAddress = netip.MustParseAddrPort("169.254.169.254:80")
DefaultServerAddress is the default address for the metadata server.
Functions ¶
This section is empty.
Types ¶
type NodeKeyResolver ¶
type NodeKeyResolver interface {
LookupPrivateKey(ctx context.Context, nodeID types.NodeID) (crypto.PrivateKey, bool)
}
NodeKeyResolver is an interface that can retrieve the private key of a node hosted on this server.
type Options ¶
type Options struct { // Address is the address to bind the metadata server to. // Defaults to DefaultMetadataAddress. Address netip.AddrPort // Host is the host node to use for the metadata server. Host host.Node // Storage is the storage provider to use for the metadata server. Storage *provider.Provider // KeyResolver is the key resolver to use for the metadata server. KeyResolver NodeKeyResolver }
Options are the options for the container metadata server.
type Server ¶
type Server struct { Options // contains filtered or unexported fields }
Server is the container metadata server.
func (*Server) ListenAndServe ¶
ListenAndServe starts the container metadata server. It blocks until the server is shutdown. If addr is empty, the default address of 169.254.169.254:80 is used.
Click to show internal directories.
Click to hide internal directories.