Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCConnection ¶
type GRPCConnection struct {
// contains filtered or unexported fields
}
GRPCConnection manages all grpc connections
func NewGRPCConnection ¶
func NewGRPCConnection() *GRPCConnection
NewGRPCConnection creates a new GRPCConnection instance
func (*GRPCConnection) Close ¶
func (g *GRPCConnection) Close(ctx context.Context, address string) error
Close recieves a connection and closes it
func (*GRPCConnection) Connect ¶
func (g *GRPCConnection) Connect(ctx context.Context, address string) (*grpc.ClientConn, error)
Connect connects to an `address` and stores it in the internal map
func (*GRPCConnection) GetConnection ¶
func (g *GRPCConnection) GetConnection(address string) *grpc.ClientConn
GetConnection receives a address and returns its connection. If a connection is not available return nil
func (*GRPCConnection) Shutdown ¶
func (g *GRPCConnection) Shutdown() []error
Shutdown closes all the connections
Click to show internal directories.
Click to hide internal directories.