Documentation ¶
Overview ¶
Package serviceregistryserver - NSM Registry Server
Index ¶
Constants ¶
View Source
const ( // NSEExpirationTimeoutDefault - default Endpoint expiration timeout, NSE will be deleted if UpdateNetworkServiceEndpoint not received NSEExpirationTimeoutDefault = 5 * time.Minute // NSEExpirationTimeoutEnv - environment variable contains custom NSEExpirationTimeout NSEExpirationTimeoutEnv = utils.EnvVar("NSE_EXPIRATION_TIMEOUT") )
Variables ¶
This section is empty.
Functions ¶
func StartNSMDTracking ¶
StartNSMDTracking - starts tracking NSMD expiration time to keep registry up to dated
Types ¶
type NSERegistryCache ¶
type NSERegistryCache interface { AddNetworkServiceEndpoint(nse *registry.NSERegistration) (*registry.NSERegistration, error) UpdateNetworkServiceEndpoint(nse *registry.NSERegistration) (*registry.NSERegistration, error) DeleteNetworkServiceEndpoint(endpointName string) (*registry.NSERegistration, error) GetEndpoints(networkServiceName string) []*registry.NSERegistration }
NSERegistryCache - cache of registered Network Service Endpoints
func NewNSERegistryCache ¶
func NewNSERegistryCache() NSERegistryCache
NewNSERegistryCache creates new nerwork service endpoints cache
type NSERegistryService ¶
type NSERegistryService interface { RegisterNSE(ctx context.Context, request *registry.NSERegistration) (*registry.NSERegistration, error) BulkRegisterNSE(registry.NetworkServiceRegistry_BulkRegisterNSEServer) error RemoveNSE(ctx context.Context, request *registry.RemoveNSERequest) (*empty.Empty, error) }
NSERegistryService - service registering Network Service Endpoints
func NewNseRegistryService ¶
func NewNseRegistryService(cache NSERegistryCache) NSERegistryService
NewNseRegistryService - creates NSE Registry service
type ServiceRegistry ¶
type ServiceRegistry interface {
NewPublicListener(registryAPIAddress string) (net.Listener, error)
}
ServiceRegistry - service starting NSE registry server
func NewNSMDServiceRegistryServer ¶
func NewNSMDServiceRegistryServer() ServiceRegistry
NewNSMDServiceRegistryServer - creates new service registry service
Click to show internal directories.
Click to hide internal directories.