pool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientPool

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

ClientPool a pool of client.

func SingletonPool

func SingletonPool() *ClientPool

SingletonPool singleton pool

func (*ClientPool) GetClient

func (pool *ClientPool) GetClient(t config.RequestType) (client.Client, error)

GetClient a factory method to get a client according to apiType .

func (*ClientPool) Put

func (pool *ClientPool) Put(t config.RequestType, c client.Client) error

Put put client to pool.

Jump to

Keyboard shortcuts

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