http

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserAgent = fmt.Sprintf("lindb-client-go/%s  (%s; %s)", "0.0.2", runtime.GOOS, runtime.GOARCH)
)

Functions

func DoPut added in v0.0.2

func DoPut(ctx context.Context, cli *http.Client, endpoint string, body []byte) ([]byte, error)

DoPut sends put request based on given client/endpoint/request body.

Types

type Options

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

Options represents http configuration options for communicating with LinDB server.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns an Options with default.

func (*Options) HTTPClient

func (o *Options) HTTPClient() *http.Client

HTTPClient returns the HTTP client with setting.

func (*Options) ReqTimeout

func (o *Options) ReqTimeout() int64

ReqTimeout returns the request timeout.

func (*Options) SetReqTimeout

func (o *Options) SetReqTimeout(timeout int64) *Options

SetReqTimeout sets the request timeout.

func (*Options) SetTLSConfig

func (o *Options) SetTLSConfig(tlsConfig *tls.Config) *Options

SetTLSConfig sets TLS configuration for secure connection.

func (*Options) TLSConfig

func (o *Options) TLSConfig() *tls.Config

TLSConfig returns TLS configuration.

Jump to

Keyboard shortcuts

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