server

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: LGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Enables listening for grpc
	GrpcEnable bool
	// Grpc listening host
	GrpcHost string
	// Grpc listening port
	GrpcPort uint16
	// Enable grpc listening via tls
	GrpcEnableTls bool

	// Enables listening for grpc-web
	WebEnable bool
	// Grpc-web listening host
	WebHost string
	// Grpc-web listening port
	WebPort uint16
	// Enable grpc-web listening via tls
	WebEnableTls bool
}

Config configuration struct for grpc server wrapper

type Registrar

type Registrar interface {
	// Register registers self into grpcServer
	Register(ctx context.Context, grpcServer *grpc.Server) (err error)
}

Registrar is interface registers self into grpcServer

type Server

type Server struct {
	*grpc.Server
	// contains filtered or unexported fields
}

func NewGrpcForServers

func NewGrpcForServers(ctx context.Context, cfg Config, servers []Registrar) (s *Server, err error)

func (*Server) Serve

func (s *Server) Serve() (ec <-chan error)

Jump to

Keyboard shortcuts

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