Documentation ¶
Index ¶
- func NewClient(address string) (conn *grpc.ClientConn, err error)
- type Server
- func (server *Server) RegisterService(register func(s *grpc.Server)) *Server
- func (server *Server) Serve(stop <-chan struct{})
- func (server *Server) Shutdown()
- func (server *Server) WithChainUnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor) *Server
- func (server *Server) WithKeepAliveParams(kp keepalive.ServerParameters) *Server
- func (server *Server) WithOptions(opts ...grpc.ServerOption) *Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a gRPC server.
func (*Server) RegisterService ¶
RegisterService registers grpc service
func (*Server) WithChainUnaryInterceptor ¶
func (server *Server) WithChainUnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor) *Server
WithChainUnaryInterceptor sets the interceptors.It must be called before RegisterService.
func (*Server) WithKeepAliveParams ¶
func (server *Server) WithKeepAliveParams(kp keepalive.ServerParameters) *Server
WithKeepAliveParams sets the KeepAlive option.It must be called before RegisterService.
func (*Server) WithOptions ¶
func (server *Server) WithOptions(opts ...grpc.ServerOption) *Server
WithOptions sets the options for the RPC server.It must be called before RegisterService.
Click to show internal directories.
Click to hide internal directories.