grpcserver

package
v0.0.0-...-6aec01b Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package grpcserver implements handy wrap around gRPC server to group common settings and tasks inside single entity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wraps gRPC server entity and handy means to simplify work with it.

func New

func New(address, crtPath, keyPath string, opts ...grpc.ServerOption) (*Server, error)

NewSecureServer creates new instance of gRPC server operating over SSL.

func (*Server) Instance

func (s *Server) Instance() *grpc.Server

Instance grants access to the underlying gRPC server. Should be used to attach new API services.

func (*Server) Notify

func (s *Server) Notify() <-chan error

Notify reports errors received during start and work of the server. Usually such errors are not recoverable.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown gracefully stops the server.

func (*Server) Start

func (s *Server) Start()

Start launches the gRPC server.

Jump to

Keyboard shortcuts

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