http

package
v1.62.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Unlicense Imports: 16 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts ...ClientOption) *http.Client

NewClient for HTTP.

Types

type ClientOption added in v1.50.0

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption for HTTP.

func WithClientBreaker added in v1.50.0

func WithClientBreaker() ClientOption

WithClientBreaker for HTTP.

func WithClientConfig added in v1.52.0

func WithClientConfig(config *Config) ClientOption

WithClientConfig for HTTP.

func WithClientLogger added in v1.52.0

func WithClientLogger(logger *zap.Logger) ClientOption

WithClientLogger for HTTP.

func WithClientRetry added in v1.50.0

func WithClientRetry() ClientOption

WithClientRetry for HTTP.

func WithClientRoundTripper added in v1.50.0

func WithClientRoundTripper(rt http.RoundTripper) ClientOption

WithClientRoundTripper for HTTP.

func WithClientTracer added in v1.52.0

func WithClientTracer(tracer opentracing.Tracer) ClientOption

WithClientTracer for HTTP.

func WithClientVersion added in v1.61.0

func WithClientVersion(version version.Version) ClientOption

WithClientVersion for HTTP.

type Config

type Config struct {
	Port      string       `yaml:"port"`
	Retry     retry.Config `yaml:"retry"`
	UserAgent string       `yaml:"user_agent"`
}

Config for HTTP.

type Server added in v1.47.0

type Server struct {
	Mux *runtime.ServeMux
	// contains filtered or unexported fields
}

Server for HTTP.

func NewServer

func NewServer(params ServerParams) *Server

NewServer for HTTP.

type ServerParams added in v1.52.0

type ServerParams struct {
	fx.In

	Lifecycle  fx.Lifecycle
	Shutdowner fx.Shutdowner
	Config     *Config
	Logger     *zap.Logger
	Tracer     opentracing.Tracer
	Version    version.Version
}

ServerParams for HTTP.

Directories

Path Synopsis
logger
zap
security
jwt
trace

Jump to

Keyboard shortcuts

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