nw_simulator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryAfterHeaderRetryAfter = iota
	RetryAfterHeaderGitHub
	RetryAfterHeaderIetfDraftSecond
	RetryAfterHeaderIetfDraftTimestamp
)

Variables

This section is empty.

Functions

func NewRateLimit

func NewRateLimit(client nw_client.Rest, rate int, headerType RetryAfterHeaderType, decorator ResponseDecorator) nw_client.Rest

func NewServerError

func NewServerError(client nw_client.Rest, rate, code int, decorator ResponseDecorator) nw_client.Rest

func NoDecorator

func NoDecorator(endpoint string, res *http.Response)

Types

type MockApiContext

type MockApiContext struct {
}

func (MockApiContext) Capture

func (z MockApiContext) Capture() esl.Logger

func (MockApiContext) ClientHash

func (z MockApiContext) ClientHash() string

func (MockApiContext) Log

func (z MockApiContext) Log() esl.Logger

func (MockApiContext) Name

func (z MockApiContext) Name() string

type MockReqBuilder

type MockReqBuilder struct {
}

func (MockReqBuilder) Build

func (z MockReqBuilder) Build() (*http.Request, error)

func (MockReqBuilder) Endpoint

func (z MockReqBuilder) Endpoint() string

func (MockReqBuilder) Param

func (z MockReqBuilder) Param() string

type PanicClient

type PanicClient struct {
}

func (PanicClient) Call

type ResponseDecorator

type ResponseDecorator func(endpoint string, res *http.Response)

type RetryAfterHeaderType

type RetryAfterHeaderType int

Jump to

Keyboard shortcuts

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