Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRegistryEntries ¶
func GetRegistryEntries(db RegistryDB) map[string]string
GetRegistryEntries returns all database entries as a map.
Types ¶
type RegistryDB ¶
type RegistryDB interface { // Store a new mapping. Empty address removes the entry. Store(controllerID, address string) // Lookup returns the endpoint or the empty string if not found. Lookup(controllerID string) (address string) // Foreach iterates over all DB entries until // the callback function returns false. Foreach(func(controllerID, address string) bool) }
RegistryDB stores the mapping from controller ID to gRPC address of the controller.
func NewMemRegistryDB ¶
func NewMemRegistryDB() RegistryDB
NewMemRegistryDB constructs a new in-memory database.
type RegistryServer ¶
type RegistryServer interface { oim.RegistryServer // Server creates a server as required to run the registry service. Server(endpoint string) (*oimcommon.NonBlockingGRPCServer, func(*grpc.Server)) }
RegistryServer is the public interface for managing a OIM registry server.
func New ¶
func New(options ...Option) (RegistryServer, error)
New creates a new instance of the OIM registry.
Click to show internal directories.
Click to hide internal directories.