Documentation ¶
Overview ¶
Package client is a generated GoMock package.
Index ¶
- Constants
- Variables
- func WithRetryPolicy(ctx context.Context, retryPolicy RetryPolicy) context.Context
- type CircuitBreakerSettings
- type Client
- type ExponentialRetryPolicy
- type GetAuthorsIter
- type GetAuthorsWithPutIter
- type GetBooksIter
- type HystrixSSEEvent
- type MockClient
- func (m *MockClient) CreateBook(ctx context.Context, i *models.Book) (*models.Book, error)
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error)
- func (m *MockClient) GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error)
- func (m *MockClient) GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error)
- func (m *MockClient) GetBookByID2(ctx context.Context, id string) (*models.Book, error)
- func (m *MockClient) GetBooks(ctx context.Context, i *models.GetBooksInput) ([]models.Book, error)
- func (m *MockClient) HealthCheck(ctx context.Context) error
- func (m *MockClient) NewGetAuthorsIter(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error)
- func (m *MockClient) NewGetAuthorsWithPutIter(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error)
- func (m *MockClient) NewGetBooksIter(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error)
- func (m *MockClient) PutBook(ctx context.Context, i *models.Book) (*models.Book, error)
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) CreateBook(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) GetAuthors(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) GetAuthorsWithPut(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) GetBookByID(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) GetBookByID2(ctx, id interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) GetBooks(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) HealthCheck(ctx interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) NewGetAuthorsIter(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) NewGetAuthorsWithPutIter(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) NewGetBooksIter(ctx, i interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) PutBook(ctx, i interface{}) *gomock.Call
- type MockGetAuthorsIter
- type MockGetAuthorsIterMockRecorder
- type MockGetAuthorsWithPutIter
- type MockGetAuthorsWithPutIterMockRecorder
- type MockGetBooksIter
- type MockGetBooksIterMockRecorder
- type NoRetryPolicy
- type RetryPolicy
- type SingleRetryPolicy
- type WagClient
- func (c *WagClient) CreateBook(ctx context.Context, i *models.Book) (*models.Book, error)
- func (c *WagClient) GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error)
- func (c *WagClient) GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error)
- func (c *WagClient) GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error)
- func (c *WagClient) GetBookByID2(ctx context.Context, id string) (*models.Book, error)
- func (c *WagClient) GetBooks(ctx context.Context, i *models.GetBooksInput) ([]models.Book, error)
- func (c *WagClient) HealthCheck(ctx context.Context) error
- func (c *WagClient) NewGetAuthorsIter(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error)
- func (c *WagClient) NewGetAuthorsWithPutIter(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error)
- func (c *WagClient) NewGetBooksIter(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error)
- func (c *WagClient) PutBook(ctx context.Context, i *models.Book) (*models.Book, error)
- func (c *WagClient) SetCircuitBreakerDebug(b bool)
- func (c *WagClient) SetCircuitBreakerSettings(settings CircuitBreakerSettings)
- func (c *WagClient) SetLogger(logger logger.KayveeLogger)
- func (c *WagClient) SetRetryPolicy(retryPolicy RetryPolicy)
- func (c *WagClient) SetTimeout(timeout time.Duration)
- func (c *WagClient) SetTransport(t http.RoundTripper)
Constants ¶
const Version = "0.1.0"
Version of the client.
const VersionHeader = "X-Client-Version"
VersionHeader is sent with every request.
Variables ¶
var DefaultCircuitBreakerSettings = CircuitBreakerSettings{
MaxConcurrentRequests: 100,
RequestVolumeThreshold: 20,
SleepWindow: 5000,
ErrorPercentThreshold: 90,
}
DefaultCircuitBreakerSettings describes the default circuit parameters.
Functions ¶
func WithRetryPolicy ¶
func WithRetryPolicy(ctx context.Context, retryPolicy RetryPolicy) context.Context
WithRetryPolicy returns a new context that overrides the client object's retry policy.
Types ¶
type CircuitBreakerSettings ¶
type CircuitBreakerSettings struct { // MaxConcurrentRequests is the maximum number of concurrent requests // the client can make at the same time. Default: 100. MaxConcurrentRequests int // RequestVolumeThreshold is the minimum number of requests needed // before a circuit can be tripped due to health. Default: 20. RequestVolumeThreshold int // SleepWindow how long, in milliseconds, to wait after a circuit opens // before testing for recovery. Default: 5000. SleepWindow int // ErrorPercentThreshold is the threshold to place on the rolling error // rate. Once the error rate exceeds this percentage, the circuit opens. // Default: 90. ErrorPercentThreshold int }
CircuitBreakerSettings are the parameters that govern the client's circuit breaker.
type Client ¶
type Client interface { // GetAuthors makes a GET request to /authors // Gets authors // 200: *models.AuthorsResponse // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error) NewGetAuthorsIter(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error) // GetAuthorsWithPut makes a PUT request to /authors // Gets authors, but needs to use the body so it's a PUT // 200: *models.AuthorsResponse // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error) NewGetAuthorsWithPutIter(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error) // GetBooks makes a GET request to /books // Returns a list of books // 200: []models.Book // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. GetBooks(ctx context.Context, i *models.GetBooksInput) ([]models.Book, error) NewGetBooksIter(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error) // CreateBook makes a POST request to /books // Creates a book // 200: *models.Book // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. CreateBook(ctx context.Context, i *models.Book) (*models.Book, error) // PutBook makes a PUT request to /books // Puts a book // 200: *models.Book // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. PutBook(ctx context.Context, i *models.Book) (*models.Book, error) // GetBookByID makes a GET request to /books/{book_id} // Returns a book // 200: *models.Book // 400: *models.BadRequest // 401: *models.Unathorized // 404: *models.Error // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error) // GetBookByID2 makes a GET request to /books2/{id} // Retrieve a book // 200: *models.Book // 400: *models.BadRequest // 404: *models.Error // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. GetBookByID2(ctx context.Context, id string) (*models.Book, error) // HealthCheck makes a GET request to /health/check // // 200: nil // 400: *models.BadRequest // 500: *models.InternalError // default: client side HTTP errors, for example: context.DeadlineExceeded. HealthCheck(ctx context.Context) error }
Client defines the methods available to clients of the swagger-test service.
type ExponentialRetryPolicy ¶
type ExponentialRetryPolicy struct{}
ExponentialRetryPolicy defines an exponential retry policy
func (ExponentialRetryPolicy) Backoffs ¶
func (ExponentialRetryPolicy) Backoffs() []time.Duration
Backoffs returns five backoffs with exponentially increasing wait times between requests: 100, 200, 400, 800, and 1600 milliseconds +/- up to 5% jitter.
type GetAuthorsIter ¶
GetAuthorsIter defines the methods available on GetAuthors iterators.
type GetAuthorsWithPutIter ¶
GetAuthorsWithPutIter defines the methods available on GetAuthorsWithPut iterators.
type GetBooksIter ¶
GetBooksIter defines the methods available on GetBooks iterators.
type HystrixSSEEvent ¶
type HystrixSSEEvent struct { Type string `json:"type"` Name string `json:"name"` RequestCount int `json:"requestCount"` ErrorCount int `json:"errorCount"` ErrorPercentage int `json:"errorPercentage"` IsCircuitBreakerOpen bool `json:"isCircuitBreakerOpen"` RollingCountFailure int `json:"rollingCountFailure"` RollingCountFallbackFailure int `json:"rollingCountFallbackFailure"` RollingCountFallbackSuccess int `json:"rollingCountFallbackSuccess"` RollingCountShortCircuited int `json:"rollingCountShortCircuited"` RollingCountSuccess int `json:"rollingCountSuccess"` RollingCountThreadPoolRejected int `json:"rollingCountThreadPoolRejected"` RollingCountTimeout int `json:"rollingCountTimeout"` CurrentConcurrentExecutionCount int `json:"currentConcurrentExecutionCount"` LatencyTotalMean int `json:"latencyTotal_mean"` }
HystrixSSEEvent is emitted by hystrix-go via server-sent events. It describes the state of a circuit.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) CreateBook ¶
CreateBook mocks base method.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) GetAuthors ¶
func (m *MockClient) GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error)
GetAuthors mocks base method.
func (*MockClient) GetAuthorsWithPut ¶
func (m *MockClient) GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error)
GetAuthorsWithPut mocks base method.
func (*MockClient) GetBookByID ¶
func (m *MockClient) GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error)
GetBookByID mocks base method.
func (*MockClient) GetBookByID2 ¶
GetBookByID2 mocks base method.
func (*MockClient) GetBooks ¶
func (m *MockClient) GetBooks(ctx context.Context, i *models.GetBooksInput) ([]models.Book, error)
GetBooks mocks base method.
func (*MockClient) HealthCheck ¶
func (m *MockClient) HealthCheck(ctx context.Context) error
HealthCheck mocks base method.
func (*MockClient) NewGetAuthorsIter ¶
func (m *MockClient) NewGetAuthorsIter(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error)
NewGetAuthorsIter mocks base method.
func (*MockClient) NewGetAuthorsWithPutIter ¶
func (m *MockClient) NewGetAuthorsWithPutIter(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error)
NewGetAuthorsWithPutIter mocks base method.
func (*MockClient) NewGetBooksIter ¶
func (m *MockClient) NewGetBooksIter(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error)
NewGetBooksIter mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) CreateBook ¶
func (mr *MockClientMockRecorder) CreateBook(ctx, i interface{}) *gomock.Call
CreateBook indicates an expected call of CreateBook.
func (*MockClientMockRecorder) GetAuthors ¶
func (mr *MockClientMockRecorder) GetAuthors(ctx, i interface{}) *gomock.Call
GetAuthors indicates an expected call of GetAuthors.
func (*MockClientMockRecorder) GetAuthorsWithPut ¶
func (mr *MockClientMockRecorder) GetAuthorsWithPut(ctx, i interface{}) *gomock.Call
GetAuthorsWithPut indicates an expected call of GetAuthorsWithPut.
func (*MockClientMockRecorder) GetBookByID ¶
func (mr *MockClientMockRecorder) GetBookByID(ctx, i interface{}) *gomock.Call
GetBookByID indicates an expected call of GetBookByID.
func (*MockClientMockRecorder) GetBookByID2 ¶
func (mr *MockClientMockRecorder) GetBookByID2(ctx, id interface{}) *gomock.Call
GetBookByID2 indicates an expected call of GetBookByID2.
func (*MockClientMockRecorder) GetBooks ¶
func (mr *MockClientMockRecorder) GetBooks(ctx, i interface{}) *gomock.Call
GetBooks indicates an expected call of GetBooks.
func (*MockClientMockRecorder) HealthCheck ¶
func (mr *MockClientMockRecorder) HealthCheck(ctx interface{}) *gomock.Call
HealthCheck indicates an expected call of HealthCheck.
func (*MockClientMockRecorder) NewGetAuthorsIter ¶
func (mr *MockClientMockRecorder) NewGetAuthorsIter(ctx, i interface{}) *gomock.Call
NewGetAuthorsIter indicates an expected call of NewGetAuthorsIter.
func (*MockClientMockRecorder) NewGetAuthorsWithPutIter ¶
func (mr *MockClientMockRecorder) NewGetAuthorsWithPutIter(ctx, i interface{}) *gomock.Call
NewGetAuthorsWithPutIter indicates an expected call of NewGetAuthorsWithPutIter.
func (*MockClientMockRecorder) NewGetBooksIter ¶
func (mr *MockClientMockRecorder) NewGetBooksIter(ctx, i interface{}) *gomock.Call
NewGetBooksIter indicates an expected call of NewGetBooksIter.
func (*MockClientMockRecorder) PutBook ¶
func (mr *MockClientMockRecorder) PutBook(ctx, i interface{}) *gomock.Call
PutBook indicates an expected call of PutBook.
type MockGetAuthorsIter ¶
type MockGetAuthorsIter struct {
// contains filtered or unexported fields
}
MockGetAuthorsIter is a mock of GetAuthorsIter interface.
func NewMockGetAuthorsIter ¶
func NewMockGetAuthorsIter(ctrl *gomock.Controller) *MockGetAuthorsIter
NewMockGetAuthorsIter creates a new mock instance.
func (*MockGetAuthorsIter) EXPECT ¶
func (m *MockGetAuthorsIter) EXPECT() *MockGetAuthorsIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockGetAuthorsIterMockRecorder ¶
type MockGetAuthorsIterMockRecorder struct {
// contains filtered or unexported fields
}
MockGetAuthorsIterMockRecorder is the mock recorder for MockGetAuthorsIter.
func (*MockGetAuthorsIterMockRecorder) Err ¶
func (mr *MockGetAuthorsIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err.
func (*MockGetAuthorsIterMockRecorder) Next ¶
func (mr *MockGetAuthorsIterMockRecorder) Next(arg0 interface{}) *gomock.Call
Next indicates an expected call of Next.
type MockGetAuthorsWithPutIter ¶
type MockGetAuthorsWithPutIter struct {
// contains filtered or unexported fields
}
MockGetAuthorsWithPutIter is a mock of GetAuthorsWithPutIter interface.
func NewMockGetAuthorsWithPutIter ¶
func NewMockGetAuthorsWithPutIter(ctrl *gomock.Controller) *MockGetAuthorsWithPutIter
NewMockGetAuthorsWithPutIter creates a new mock instance.
func (*MockGetAuthorsWithPutIter) EXPECT ¶
func (m *MockGetAuthorsWithPutIter) EXPECT() *MockGetAuthorsWithPutIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGetAuthorsWithPutIter) Err ¶
func (m *MockGetAuthorsWithPutIter) Err() error
Err mocks base method.
type MockGetAuthorsWithPutIterMockRecorder ¶
type MockGetAuthorsWithPutIterMockRecorder struct {
// contains filtered or unexported fields
}
MockGetAuthorsWithPutIterMockRecorder is the mock recorder for MockGetAuthorsWithPutIter.
func (*MockGetAuthorsWithPutIterMockRecorder) Err ¶
func (mr *MockGetAuthorsWithPutIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err.
func (*MockGetAuthorsWithPutIterMockRecorder) Next ¶
func (mr *MockGetAuthorsWithPutIterMockRecorder) Next(arg0 interface{}) *gomock.Call
Next indicates an expected call of Next.
type MockGetBooksIter ¶
type MockGetBooksIter struct {
// contains filtered or unexported fields
}
MockGetBooksIter is a mock of GetBooksIter interface.
func NewMockGetBooksIter ¶
func NewMockGetBooksIter(ctrl *gomock.Controller) *MockGetBooksIter
NewMockGetBooksIter creates a new mock instance.
func (*MockGetBooksIter) EXPECT ¶
func (m *MockGetBooksIter) EXPECT() *MockGetBooksIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockGetBooksIterMockRecorder ¶
type MockGetBooksIterMockRecorder struct {
// contains filtered or unexported fields
}
MockGetBooksIterMockRecorder is the mock recorder for MockGetBooksIter.
func (*MockGetBooksIterMockRecorder) Err ¶
func (mr *MockGetBooksIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err.
func (*MockGetBooksIterMockRecorder) Next ¶
func (mr *MockGetBooksIterMockRecorder) Next(arg0 interface{}) *gomock.Call
Next indicates an expected call of Next.
type NoRetryPolicy ¶
type NoRetryPolicy struct{}
NoRetryPolicy defines a policy of never retrying a request.
func (NoRetryPolicy) Backoffs ¶
func (NoRetryPolicy) Backoffs() []time.Duration
Backoffs returns an empty slice.
type RetryPolicy ¶
type RetryPolicy interface { // Backoffs returns the number and timing of retry attempts. Backoffs() []time.Duration // Retry receives the http request, as well as the result of // net/http.Client's `Do` method. Retry(*http.Request, *http.Response, error) bool }
RetryPolicy defines a retry policy.
type SingleRetryPolicy ¶
type SingleRetryPolicy struct{}
SingleRetryPolicy defines a retry that retries a request once
func (SingleRetryPolicy) Backoffs ¶
func (SingleRetryPolicy) Backoffs() []time.Duration
Backoffs returns that you should retry the request 1second after it fails.
type WagClient ¶
type WagClient struct {
// contains filtered or unexported fields
}
WagClient is used to make requests to the swagger-test service.
func NewFromDiscovery ¶
NewFromDiscovery creates a client from the discovery environment variables. This method requires the three env vars: SERVICE_SWAGGER_TEST_HTTP_(HOST/PORT/PROTO) to be set. Otherwise it returns an error.
func (*WagClient) CreateBook ¶
CreateBook makes a POST request to /books Creates a book 200: *models.Book 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) GetAuthors ¶
func (c *WagClient) GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error)
GetAuthors makes a GET request to /authors Gets authors 200: *models.AuthorsResponse 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) GetAuthorsWithPut ¶
func (c *WagClient) GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error)
GetAuthorsWithPut makes a PUT request to /authors Gets authors, but needs to use the body so it's a PUT 200: *models.AuthorsResponse 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) GetBookByID ¶
func (c *WagClient) GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error)
GetBookByID makes a GET request to /books/{book_id} Returns a book 200: *models.Book 400: *models.BadRequest 401: *models.Unathorized 404: *models.Error 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) GetBookByID2 ¶
GetBookByID2 makes a GET request to /books2/{id} Retrieve a book 200: *models.Book 400: *models.BadRequest 404: *models.Error 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) GetBooks ¶
GetBooks makes a GET request to /books Returns a list of books 200: []models.Book 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) HealthCheck ¶
HealthCheck makes a GET request to /health/check
200: nil 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) NewGetAuthorsIter ¶
func (c *WagClient) NewGetAuthorsIter(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error)
NewgetAuthorsIter constructs an iterator that makes calls to getAuthors for each page.
func (*WagClient) NewGetAuthorsWithPutIter ¶
func (c *WagClient) NewGetAuthorsWithPutIter(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error)
NewgetAuthorsWithPutIter constructs an iterator that makes calls to getAuthorsWithPut for each page.
func (*WagClient) NewGetBooksIter ¶
func (c *WagClient) NewGetBooksIter(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error)
NewgetBooksIter constructs an iterator that makes calls to getBooks for each page.
func (*WagClient) PutBook ¶
PutBook makes a PUT request to /books Puts a book 200: *models.Book 400: *models.BadRequest 500: *models.InternalError default: client side HTTP errors, for example: context.DeadlineExceeded.
func (*WagClient) SetCircuitBreakerDebug ¶
SetCircuitBreakerDebug puts the circuit
func (*WagClient) SetCircuitBreakerSettings ¶
func (c *WagClient) SetCircuitBreakerSettings(settings CircuitBreakerSettings)
SetCircuitBreakerSettings sets parameters on the circuit breaker. It must be called on application startup.
func (*WagClient) SetLogger ¶
func (c *WagClient) SetLogger(logger logger.KayveeLogger)
SetLogger allows for setting a custom logger
func (*WagClient) SetRetryPolicy ¶
func (c *WagClient) SetRetryPolicy(retryPolicy RetryPolicy)
SetRetryPolicy sets a the given retry policy for all requests.
func (*WagClient) SetTimeout ¶
SetTimeout sets a timeout on all operations for the client. To make a single request with a shorter timeout than the default on the client, use context.WithTimeout as described here: https://godoc.org/golang.org/x/net/context#WithTimeout.
func (*WagClient) SetTransport ¶
func (c *WagClient) SetTransport(t http.RoundTripper)
SetTransport sets the http transport used by the client.