Documentation
¶
Index ¶
- func ServerInitialization()
- func ServerInitializationWithTLS()
- type GrpcServer
- type GrpcServerBuilder
- func (sb *GrpcServerBuilder) AddOption(o grpc.ServerOption)
- func (sb *GrpcServerBuilder) Build() GrpcServer
- func (sb *GrpcServerBuilder) DisableDefaultHealthCheck(e bool)
- func (sb *GrpcServerBuilder) EnableReflection(e bool)
- func (sb *GrpcServerBuilder) SetServerParameters(serverParams keepalive.ServerParameters)
- func (sb *GrpcServerBuilder) SetStreamInterceptors(interceptors []grpc.StreamServerInterceptor)
- func (sb *GrpcServerBuilder) SetTlsCert(cert *tls.Certificate)
- func (sb *GrpcServerBuilder) SetUnaryInterceptors(interceptors []grpc.UnaryServerInterceptor)
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) 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