grpcsrv

package
v0.0.0-...-839fe76 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCSrv

type GRPCSrv struct {
	*grpc.Server
}

GRPCSrv wraps a grpc.Server for convenience.

func New

func New() (*GRPCSrv, error)

New returns a pointer to a basic GRPCSrv instance or an error.

func (*GRPCSrv) RegisterServices

func (s *GRPCSrv) RegisterServices(rs ...Registerable) error

RegisterServices registers services with the underlying grpc.Server.

func (*GRPCSrv) Serve

func (s *GRPCSrv) Serve(port string) error

Serve sets up a tcp listener on the provided port and serves the underlying grpc.Server instance.

type Registerable

type Registerable interface {
	RegisterWithGRPCServer(*grpc.Server) error
}

Registerable describes services able to be registered with a grpc.Server.

Jump to

Keyboard shortcuts

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