http

package
v1.51.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Unlicense Imports: 14 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *Config, logger *zap.Logger, 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. nolint:ireturn

func WithClientRetry added in v1.50.0

func WithClientRetry() ClientOption

WithClientRetry for HTTP. nolint:ireturn

func WithClientRoundTripper added in v1.50.0

func WithClientRoundTripper(rt http.RoundTripper) ClientOption

WithClientRoundTripper for HTTP. nolint:ireturn

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(lc fx.Lifecycle, s fx.Shutdowner, cfg *Config, logger *zap.Logger) *Server

NewServer 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