serviceregistryserver

package
v0.0.0-...-e58ac12 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

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 New

func New(ctx context.Context) *grpc.Server

New - creates new grcp server and registers NSE discovery and registry services

func StartNSMDTracking

func StartNSMDTracking(ctx context.Context, rc *nseRegistryCache)

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

Jump to

Keyboard shortcuts

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