clientproxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientProxy clientProxy

MultiProxy ..

Functions

func Init

func Init()

Init ...

func InitMultiProxy

func InitMultiProxy() (obj *multiProxy)

func InitSingleProxy

func InitSingleProxy() (obj *simplePorxy)

Types

type EtcdClient

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

func NewEtcdClient

func NewEtcdClient(endpoints []string, timeout time.Duration, basicAuth bool, username, password string) (obj *EtcdClient, err error)

NewEtcdClient ..

func (*EtcdClient) Get

func (e *EtcdClient) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (resp *clientv3.GetResponse, err error)

func (*EtcdClient) Put

func (e *EtcdClient) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)

type RestyClient

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

func NewRestyClient

func NewRestyClient(mode string, proxyAddr string) (obj *RestyClient)

func (*RestyClient) Get

func (r *RestyClient) Get(req view.ReqHTTPProxy) (*resty.Response, error)

func (*RestyClient) Post

func (r *RestyClient) Post(req view.ReqHTTPProxy) (*resty.Response, error)

Jump to

Keyboard shortcuts

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