grpc_server

package
v0.0.0-...-b1d94cb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerInitialization

func ServerInitialization()

func ServerInitializationWithTLS

func ServerInitializationWithTLS()

Types

type GrpcServer

type GrpcServer interface {
	Start(address string, port uint) error
	AwaitTermination(shutdownHook func())
	RegisterService(reg func(*grpc.Server))
	GetListener() net.Listener
}

Fiji GRPC server interface

type GrpcServerBuilder

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

GRPC server builder

func (*GrpcServerBuilder) AddOption

func (sb *GrpcServerBuilder) AddOption(o grpc.ServerOption)

DialOption configures how we set up the connection.

func (*GrpcServerBuilder) Build

func (sb *GrpcServerBuilder) Build() GrpcServer

Build is responsible for building a Fiji GRPC server

func (*GrpcServerBuilder) DisableDefaultHealthCheck

func (sb *GrpcServerBuilder) DisableDefaultHealthCheck(e bool)

DisableDefaultHealthCheck disables the default health check service Warning! if you disable the default health check you must provide a custom health check service

func (*GrpcServerBuilder) EnableReflection

func (sb *GrpcServerBuilder) EnableReflection(e bool)

EnableReflection enables the reflection gRPC Server Reflection provides information about publicly-accessible gRPC services on a server, and assists clients at runtime to construct RPC requests and responses without precompiled service information. It is used by gRPC CLI, which can be used to introspect server protos and send/receive test RPCs. Warning! We should not have this enabled in production

func (*GrpcServerBuilder) SetServerParameters

func (sb *GrpcServerBuilder) SetServerParameters(serverParams keepalive.ServerParameters)

ServerParameters is used to set keepalive and max-age parameters on the server-side.

func (*GrpcServerBuilder) SetStreamInterceptors

func (sb *GrpcServerBuilder) SetStreamInterceptors(interceptors []grpc.StreamServerInterceptor)

SetStreamInterceptors set a list of interceptors to the Grpc server for stream connection By default, gRPC doesn't allow one to have more than one interceptor either on the client nor on the server side. By using `grpc_middleware` we are able to provides convenient method to add a list of interceptors

func (*GrpcServerBuilder) SetTlsCert

func (sb *GrpcServerBuilder) SetTlsCert(cert *tls.Certificate)

SetTlsCert sets credentials for server connections

func (*GrpcServerBuilder) SetUnaryInterceptors

func (sb *GrpcServerBuilder) SetUnaryInterceptors(interceptors []grpc.UnaryServerInterceptor)

SetUnaryInterceptors set a list of interceptors to the Grpc server for unary connection By default, gRPC doesn't allow one to have more than one interceptor either on the client nor on the server side. By using `grpc_middleware` we are able to provides convenient method to add a list of interceptors

Jump to

Keyboard shortcuts

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