kresty

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*resty.Client
	Logger baselogger.Logger
}

func New

func New(opts ...*Option) *Client

func (*Client) WithKTraceLog

func (c *Client) WithKTraceLog(l *klog.Logger) *Client

func (*Client) WithKlogging

func (c *Client) WithKlogging() *Client

func (*Client) WithMetric

func (c *Client) WithMetric() *Client

func (*Client) WithSimpleLog

func (c *Client) WithSimpleLog() *Client

func (*Client) WithTotalLog

func (c *Client) WithTotalLog() *Client

func (*Client) WithTrace

func (c *Client) WithTrace(tracer opentracing.Tracer) *Client

type Option

type Option struct {
	HTTPClient *http.Client
	Logger     baselogger.Logger
	Timeout    time.Duration
}

func NewOption

func NewOption() *Option

func SetHTTPClient

func SetHTTPClient(l *http.Client) *Option

func SetLogger

func SetLogger(l baselogger.Logger) *Option

func SetTimeout

func SetTimeout(t time.Duration) *Option

func (*Option) MergeOption

func (c *Option) MergeOption(opts ...*Option) *Option

func (*Option) SetHTTPClient

func (c *Option) SetHTTPClient(l *http.Client) *Option

func (*Option) SetLogger

func (c *Option) SetLogger(l baselogger.Logger) *Option

func (*Option) SetTimeout

func (c *Option) SetTimeout(t time.Duration) *Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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