Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Name string Address string TLS bool TLSOptions *TLSOptions Conn *grpc.ClientConn }
func (*Connection) Connect ¶
func (c *Connection) Connect() (*Connection, error)
Connect connect to gRPC server Remember to defer.Close() to avoid memory leak
type Connector ¶
type Connector map[string]*Connection
func (Connector) Add ¶
func (c Connector) Add(connections ...*Connection) Connector
Add add connection to connector
func (Connector) Connect ¶
func (c Connector) Connect(name string) (*grpc.ClientConn, error)
Connect connect to the gRPC server Remember to defer Close() to avoid memory leak
func (Connector) Delete ¶
func (c Connector) Delete(connections ...*Connection) Connector
Delete delete connection in the connector
type TLSOptions ¶
Click to show internal directories.
Click to hide internal directories.