server

package
v0.0.0-...-f584327 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthResponse = `{"health":"true"}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// ClientTLS is tls config for peer communication
	ClientTLS *tls.Config

	// EnableEtcdProxy is the flag if etcd proxy should start
	EnableEtcdProxy bool
}

Config is the configuration of server

type Server

type Server interface {
	// RegisterClient registers grpc service for clients
	RegisterClient(server *grpc.Server)

	// RegisterPeer registers grpc service for peer
	RegisterPeer(server *grpc.Server)

	// GetClientHttpHandlers returns http handlers for client
	GetClientHttpHandlers() map[string]http.Handler

	// GetPeerHttpHandlers returns http handlers for peer
	GetPeerHttpHandlers() map[string]http.Handler

	// GetInfoHttpHandlers returns http handlers for node info
	GetInfoHttpHandlers() map[string]http.Handler
}

Server is the application layer server providing services for clients and peers

func NewServer

func NewServer(backend backend.Backend, metricCli metrics.Metrics, config Config) Server

NewServer returns the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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