clientmanager

package
v0.0.3-pre4.0...-0ec3cfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientManager

type ClientManager struct {
	// contains filtered or unexported fields
}

ClientManager manages GRPC client connections

func New

func New() *ClientManager

New creates a new ClientManager

func (*ClientManager) AddIfNotExists

func (cm *ClientManager) AddIfNotExists(target string, opts ...grpc.DialOption) error

AddIfNotExists adds a client if it doesn't exist already

func (*ClientManager) Get

func (cm *ClientManager) Get(target string) *grpc.ClientConn

Get gets a target connection and tracks it's usage

func (*ClientManager) Metrics

Metrics gets ClientManager metrics

func (*ClientManager) Release

func (cm *ClientManager) Release(target string)

Release releases a connection if refCount reaches 0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL