Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Target returns the RPC server address. Target() string // Conn returns the client connection to an RPC server. Conn() *gorpc.ClientConn // Options returns a list of DialOption. Options() []gorpc.DialOption // Stop tears down the ClientConn and all underlying connections. Stop() }
Client defines an interface representing a gRPC-based client.
func NewClientToTarget ¶
NewClientToTarget creates a new Client based on a target server address.
type KeepaliveOptions ¶
type KeepaliveOptions struct { ClientKeepaliveTime int ClientKeepaliveTimeout int ServerKeepaliveTime int ServerKeepaliveTimeout int }
KeepaliveOptions is the options for set the gRPC servers or clients.
type Server ¶
type Server interface { // Address returns the listener address Address() string // Server returns the underlying grpc.Server instance Server() *gorpc.Server // Listener returns the underlying net.Listener instance Listener() net.Listener // Start the underlying grpc.Server Start() error // Stop the underlying grpc.Server Stop() }
Server defines an interface representing a GRPC-based server.
func NewServerFromAddress ¶
NewServerFromAddress creates a new server listening on address.
Click to show internal directories.
Click to hide internal directories.