Documentation
¶
Index ¶
- type Client
- type ClientCallFunc
- type ClientConfig
- type ClientEntity
- func (c *ClientEntity) AddDialOptions(dialOption ...grpc.DialOption)
- func (c *ClientEntity) AddStreamInterceptor(interceptor ...grpc.StreamClientInterceptor)
- func (c *ClientEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryClientInterceptor)
- func (c *ClientEntity) Close()
- func (c *ClientEntity) Conn() *grpc.ClientConn
- func (c *ClientEntity) Dial() (conn *grpc.ClientConn, err error)
- func (c *ClientEntity) DialWithCall(call ClientCallFunc) (any, error)
- type Server
- type ServerConfig
- type ServerEntity
- func (s *ServerEntity) AddServerOptions(serverOption ...grpc.ServerOption)
- func (s *ServerEntity) AddStreamInterceptor(interceptor ...grpc.StreamServerInterceptor)
- func (s *ServerEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryServerInterceptor)
- func (s *ServerEntity) Engine() *grpc.Server
- func (s *ServerEntity) Shutdown() error
- func (s *ServerEntity) Start(register ServerRegisterFunc) (err error)
- type ServerRegisterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
AddDialOptions(...grpc.DialOption)
AddUnaryInterceptor(interceptor ...grpc.UnaryClientInterceptor)
AddStreamInterceptor(interceptor ...grpc.StreamClientInterceptor)
Dial() (*grpc.ClientConn, error)
DialWithCall(ClientCallFunc) (any, error)
Conn() *grpc.ClientConn
Close()
}
func NewClient ¶
func NewClient(conf *ClientConfig) Client
type ClientCallFunc ¶
type ClientCallFunc func(*grpc.ClientConn) (any, error)
type ClientConfig ¶
type ClientEntity ¶
type ClientEntity struct {
*ClientConfig
// contains filtered or unexported fields
}
func (*ClientEntity) AddDialOptions ¶
func (c *ClientEntity) AddDialOptions(dialOption ...grpc.DialOption)
func (*ClientEntity) AddStreamInterceptor ¶
func (c *ClientEntity) AddStreamInterceptor(interceptor ...grpc.StreamClientInterceptor)
func (*ClientEntity) AddUnaryInterceptor ¶
func (c *ClientEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryClientInterceptor)
func (*ClientEntity) Close ¶
func (c *ClientEntity) Close()
func (*ClientEntity) Conn ¶
func (c *ClientEntity) Conn() *grpc.ClientConn
func (*ClientEntity) Dial ¶
func (c *ClientEntity) Dial() (conn *grpc.ClientConn, err error)
func (*ClientEntity) DialWithCall ¶
func (c *ClientEntity) DialWithCall(call ClientCallFunc) (any, error)
type Server ¶
type Server interface {
AddServerOptions(serverOption ...grpc.ServerOption)
AddUnaryInterceptor(interceptor ...grpc.UnaryServerInterceptor)
AddStreamInterceptor(interceptor ...grpc.StreamServerInterceptor)
Start(ServerRegisterFunc) error
Engine() *grpc.Server
Shutdown() error
}
func NewServer ¶
func NewServer(conf *ServerConfig) Server
type ServerConfig ¶
type ServerEntity ¶
type ServerEntity struct {
*ServerConfig
// contains filtered or unexported fields
}
func (*ServerEntity) AddServerOptions ¶
func (s *ServerEntity) AddServerOptions(serverOption ...grpc.ServerOption)
func (*ServerEntity) AddStreamInterceptor ¶
func (s *ServerEntity) AddStreamInterceptor(interceptor ...grpc.StreamServerInterceptor)
func (*ServerEntity) AddUnaryInterceptor ¶
func (s *ServerEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryServerInterceptor)
func (*ServerEntity) Engine ¶
func (s *ServerEntity) Engine() *grpc.Server
func (*ServerEntity) Shutdown ¶
func (s *ServerEntity) Shutdown() error
func (*ServerEntity) Start ¶
func (s *ServerEntity) Start(register ServerRegisterFunc) (err error)
type ServerRegisterFunc ¶
Click to show internal directories.
Click to hide internal directories.