Documentation
¶
Index ¶
- func NewClient(params ClientParams, opts ...ClientOption) *http.Client
- type ClientOption
- func WithClientBreaker() ClientOption
- func WithClientLogger(logger *zap.Logger) ClientOption
- func WithClientMetrics(metrics *prometheus.ClientCollector) ClientOption
- func WithClientRetry() ClientOption
- func WithClientRoundTripper(rt http.RoundTripper) ClientOption
- func WithClientTracer(tracer hotel.Tracer) ClientOption
- type ClientParams
- type Config
- type Server
- type ServerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(params ClientParams, 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 WithClientLogger ¶ added in v1.52.0
func WithClientLogger(logger *zap.Logger) ClientOption
WithClientLogger for HTTP.
func WithClientMetrics ¶ added in v1.65.0
func WithClientMetrics(metrics *prometheus.ClientCollector) ClientOption
WithClientMetrics 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 hotel.Tracer) ClientOption
WithClientTracer for HTTP.
type Config ¶
type Config struct { Retry retry.Config `yaml:"retry" json:"retry" toml:"retry"` UserAgent string `yaml:"user_agent" json:"user_agent" toml:"user_agent"` }
Config for HTTP.
type Server ¶ added in v1.47.0
Server for HTTP.
type ServerParams ¶ added in v1.52.0
type ServerParams struct { fx.In Shutdowner fx.Shutdowner Config *Config Logger *zap.Logger Tracer otel.Tracer Metrics *prometheus.ServerCollector }
ServerParams for HTTP.
Click to show internal directories.
Click to hide internal directories.