Documentation ¶
Index ¶
- type Manager
- type Option
- func WithBasicAuth(user, pass string) Option
- func WithLargeContentTimeout(v time.Duration) Option
- func WithLogger(l logger.Manager) Option
- func WithMetrics(enabled bool, metric telemetry.MetricsManager) Option
- func WithName(v string) Option
- func WithServiceUrl(url string) Option
- func WithTransport(t ...TransportOption) Option
- type Transport
- type TransportOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { ServiceUrl() string Post(ctx context.Context, action, url string, body interface{}, bindTo interface{}) (int, error) PostRaw(ctx context.Context, action, url string, payload []byte, bindTo interface{}) (int, error) PostWithRawResult(ctx context.Context, action, url string, payload []byte, bindTo interface{}) (int, []byte, error) PostWithLargeResult(ctx context.Context, action, url string, payload []byte) (int, io.Reader, error) WithCircuitBreaker( maxRequest uint32, interval time.Duration, timeout time.Duration, ) Manager // contains filtered or unexported methods }
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithBasicAuth ¶
func WithLargeContentTimeout ¶
func WithLogger ¶
func WithMetrics ¶
func WithMetrics(enabled bool, metric telemetry.MetricsManager) Option
func WithServiceUrl ¶
func WithTransport ¶
func WithTransport(t ...TransportOption) Option
type Transport ¶
func NewTransport ¶
func NewTransport(opts ...TransportOption) Transport
type TransportOption ¶
type TransportOption interface {
// contains filtered or unexported methods
}
func WithTelemetry ¶
func WithTelemetry(tm telemetry.Manager) TransportOption
func WithTransportName ¶
func WithTransportName(name string) TransportOption
Click to show internal directories.
Click to hide internal directories.