services

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package services contains the gRPC server for inter-node communication.

Index

Constants

View Source
const DefaultGRPCListenAddress = "[::]:8443"

DefaultGRPCListenAddress is the default listen address for the gRPC server.

View Source
const DefaultGRPCPort = 8443

DefaultGRPCPort is the default port for the gRPC server.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeshServer added in v0.3.1

type MeshServer interface {
	// ListenAndServe starts the server and blocks until the server exits.
	ListenAndServe() error
	// Shutdown attempts to stops the server gracefully.
	Shutdown(ctx context.Context) error
}

MeshServer is the generic interface for additional services that can be managed by this server.

type Options

type Options struct {
	// DisableGRPC disables the gRPC server and only runs the MeshServers.
	DisableGRPC bool
	// ListenAddress is the address to start the gRPC server on.
	ListenAddress string
	// ServerOptions are options for the server. This should include
	// any registered authentication mechanisms.
	ServerOptions []grpc.ServerOption
	// Servers are additional servers to manage alongside the gRPC server.
	Servers []MeshServer
}

Options contains the configuration for the gRPC server.

type Server

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

Server is the gRPC server.

func NewServer

func NewServer(ctx context.Context, o Options) (*Server, error)

NewServer returns a new Server. TODO: We need to dynamically expose certain services only to the internal mesh.

func (*Server) GetServiceInfo

func (s *Server) GetServiceInfo() map[string]grpc.ServiceInfo

GetServiceInfo implements reflection.ServiceInfoProvider.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe starts the gRPC server and optional metrics server then blocks until the gRPC server exits.

func (*Server) RegisterService

func (s *Server) RegisterService(desc *grpc.ServiceDesc, impl any)

RegisterService implements grpc.RegistrarService.

func (*Server) Shutdown added in v0.3.1

func (s *Server) Shutdown(ctx context.Context)

Shutdown stops the gRPC server and all mesh services gracefully. You cannot use the server again after calling Stop.

Directories

Path Synopsis
Package admin provides the admin gRPC server.
Package admin provides the admin gRPC server.
Package leaderproxy provides a gRPC interceptor that proxies requests to the leader node.
Package leaderproxy provides a gRPC interceptor that proxies requests to the leader node.
Package membership contains the webmesh membership service.
Package membership contains the webmesh membership service.
Package meshapi contains the webmesh Mesh API service.
Package meshapi contains the webmesh Mesh API service.
Package meshdns contains the Mesh DNS server.
Package meshdns contains the Mesh DNS server.
Package metrics contains the HTTP server for exposing Prometheus metrics.
Package metrics contains the HTTP server for exposing Prometheus metrics.
Package node contains the webmesh node service.
Package node contains the webmesh node service.
Package rbac contains utilities for evaluating requests against roles.
Package rbac contains utilities for evaluating requests against roles.
Package storage provides the storage server.
Package storage provides the storage server.
Package turn contains the STUN/TURN server.
Package turn contains the STUN/TURN server.
Package webrtc contains the webmesh WebRTC service.
Package webrtc contains the webmesh WebRTC service.

Jump to

Keyboard shortcuts

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