server

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	node.Node
	Services() *ServiceRegistry
}

Node is an interface for proxy nodes

type RegisterServiceFunc

type RegisterServiceFunc func(server *grpc.Server)

RegisterServiceFunc is a function for registering a service

type Server

type Server struct {
	Cluster cluster.Cluster
	// contains filtered or unexported fields
}

Server is a base server

func NewServer

func NewServer(cluster cluster.Cluster) *Server

NewServer creates a new server

func (*Server) RegisterService

func (s *Server) RegisterService(service RegisterServiceFunc)

RegisterService registers a service

func (*Server) Services

func (s *Server) Services() *ServiceRegistry

Services returns the service registry

func (*Server) Start

func (s *Server) Start() error

Start starts the node

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the node

type ServiceRegistry

type ServiceRegistry struct {
	// contains filtered or unexported fields
}

ServiceRegistry is a registry of services

func NewServiceRegistry

func NewServiceRegistry() *ServiceRegistry

NewServiceRegistry creates a new service registry

func (*ServiceRegistry) GetServices

func (r *ServiceRegistry) GetServices() []RegisterServiceFunc

GetServices returns the registered service factory functions

func (*ServiceRegistry) RegisterService

func (r *ServiceRegistry) RegisterService(service RegisterServiceFunc)

RegisterService registers a service factory function

Jump to

Keyboard shortcuts

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