grpc

package
v0.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrInvalidArgument

func ErrInvalidArgument(msg string) error

func NewGrpcConnectionFactory

func NewGrpcConnectionFactory(url string) grpcConnectionFactory

NewGrpcConnectionFactory creates a new factory for gRPC connections.

func NewGrpcConnectionFactoryWithDefaults

func NewGrpcConnectionFactoryWithDefaults(url string) grpcConnectionFactory

NewGrpcConnectionFactoryWithDefaults creates a new factory for gRPC connections and adds the following dial options: WithInsecure, WithBlock.

Types

type Server

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

Server is the implementation of an API Server

func NewServer

func NewServer(name string, keepAlive bool) *Server

NewServer returns a new configured instance of Server

func NewServerWithOpts

func NewServerWithOpts(name string, keepAlive bool, unaryServerInterceptors []grpc.UnaryServerInterceptor, streamServerInterceptors []grpc.StreamServerInterceptor) *Server

NewServerWithOpts returns a new configured instance of Server with additional interceptros specified

func (*Server) RegisterService

func (s *Server) RegisterService(f func(grpc.ServiceRegistrar))

RegisterService registers your gRPC service implementation with the server

func (*Server) Serve

func (s *Server) Serve(apiAddr, metricsAddr string) error

Serve starts the api listeners of the Server

func (*Server) ServeFromListener

func (s *Server) ServeFromListener(apiLis net.Listener, metricsLis net.Listener) error

ServeFromListener starts the api listeners of the Server

func (*Server) Shutdown

func (s *Server) Shutdown()

Tell the server to shutdown

Directories

Path Synopsis
middleware

Jump to

Keyboard shortcuts

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