Documentation ¶
Index ¶
- func NewClient(opts ...ClientOption) *http.Client
- type ClientOption
- func WithClientBreaker() ClientOption
- func WithClientConfig(config *Config) ClientOption
- func WithClientLogger(logger *zap.Logger) ClientOption
- func WithClientRetry() ClientOption
- func WithClientRoundTripper(rt http.RoundTripper) ClientOption
- func WithClientTracer(tracer opentracing.Tracer) ClientOption
- type Config
- type Server
- type ServerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 WithClientConfig ¶ added in v1.52.0
func WithClientConfig(config *Config) ClientOption
WithClientConfig for gRPC. nolint:ireturn
func WithClientLogger ¶ added in v1.52.0
func WithClientLogger(logger *zap.Logger) ClientOption
WithClientLogger for gRPC. 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
func WithClientTracer ¶ added in v1.52.0
func WithClientTracer(tracer opentracing.Tracer) ClientOption
WithClientConfig for gRPC. nolint:ireturn
type Config ¶
type Config struct { Port string `yaml:"port"` Retry retry.Config `yaml:"retry"` UserAgent string `yaml:"user_agent"` }
Config for HTTP.
Click to show internal directories.
Click to hide internal directories.