Versions in this module Expand all Collapse all v5 v5.0.0 Dec 18, 2020 Changes in this version + const Version + const VersionHeader + var DefaultCircuitBreakerSettings = CircuitBreakerSettings + func WithRetryPolicy(ctx context.Context, retryPolicy RetryPolicy) context.Context + type CircuitBreakerSettings struct + ErrorPercentThreshold int + MaxConcurrentRequests int + RequestVolumeThreshold int + SleepWindow int + type Client interface + CreateBook func(ctx context.Context, i *models.Book) (*models.Book, error) + GetAuthors func(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, error) + GetAuthorsWithPut func(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, error) + GetBookByID func(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error) + GetBookByID2 func(ctx context.Context, id string) (*models.Book, error) + GetBooks func(ctx context.Context, i *models.GetBooksInput) ([]models.Book, error) + HealthCheck func(ctx context.Context) error + NewGetAuthorsIter func(ctx context.Context, i *models.GetAuthorsInput) (GetAuthorsIter, error) + NewGetAuthorsWithPutIter func(ctx context.Context, i *models.GetAuthorsWithPutInput) (GetAuthorsWithPutIter, error) + NewGetBooksIter func(ctx context.Context, i *models.GetBooksInput) (GetBooksIter, error) + PutBook func(ctx context.Context, i *models.Book) (*models.Book, error) + type ExponentialRetryPolicy struct + func (ExponentialRetryPolicy) Backoffs() []time.Duration + func (ExponentialRetryPolicy) Retry(req *http.Request, resp *http.Response, err error) bool + type GetAuthorsIter interface + Err func() error + Next func(*models.Author) bool + type GetAuthorsWithPutIter interface + Err func() error + Next func(*models.Author) bool + type GetBooksIter interface + Err func() error + Next func(*models.Book) bool + type HystrixSSEEvent struct + CurrentConcurrentExecutionCount int + ErrorCount int + ErrorPercentage int + IsCircuitBreakerOpen bool + LatencyTotalMean int + Name string + RequestCount int + RollingCountFailure int + RollingCountFallbackFailure int + RollingCountFallbackSuccess int + RollingCountShortCircuited int + RollingCountSuccess int + RollingCountThreadPoolRejected int + RollingCountTimeout int + Type string + type MockClient struct + func NewMockClient(ctrl *gomock.Controller) *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 struct + 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 struct + func NewMockGetAuthorsIter(ctrl *gomock.Controller) *MockGetAuthorsIter + func (m *MockGetAuthorsIter) EXPECT() *MockGetAuthorsIterMockRecorder + func (m *MockGetAuthorsIter) Err() error + func (m *MockGetAuthorsIter) Next(arg0 *models.Author) bool + type MockGetAuthorsIterMockRecorder struct + func (mr *MockGetAuthorsIterMockRecorder) Err() *gomock.Call + func (mr *MockGetAuthorsIterMockRecorder) Next(arg0 interface{}) *gomock.Call + type MockGetAuthorsWithPutIter struct + func NewMockGetAuthorsWithPutIter(ctrl *gomock.Controller) *MockGetAuthorsWithPutIter + func (m *MockGetAuthorsWithPutIter) EXPECT() *MockGetAuthorsWithPutIterMockRecorder + func (m *MockGetAuthorsWithPutIter) Err() error + func (m *MockGetAuthorsWithPutIter) Next(arg0 *models.Author) bool + type MockGetAuthorsWithPutIterMockRecorder struct + func (mr *MockGetAuthorsWithPutIterMockRecorder) Err() *gomock.Call + func (mr *MockGetAuthorsWithPutIterMockRecorder) Next(arg0 interface{}) *gomock.Call + type MockGetBooksIter struct + func NewMockGetBooksIter(ctrl *gomock.Controller) *MockGetBooksIter + func (m *MockGetBooksIter) EXPECT() *MockGetBooksIterMockRecorder + func (m *MockGetBooksIter) Err() error + func (m *MockGetBooksIter) Next(arg0 *models.Book) bool + type MockGetBooksIterMockRecorder struct + func (mr *MockGetBooksIterMockRecorder) Err() *gomock.Call + func (mr *MockGetBooksIterMockRecorder) Next(arg0 interface{}) *gomock.Call + type NoRetryPolicy struct + func (NoRetryPolicy) Backoffs() []time.Duration + func (NoRetryPolicy) Retry(*http.Request, *http.Response, error) bool + type RetryPolicy interface + Backoffs func() []time.Duration + Retry func(*http.Request, *http.Response, error) bool + type SingleRetryPolicy struct + func (SingleRetryPolicy) Backoffs() []time.Duration + func (SingleRetryPolicy) Retry(req *http.Request, resp *http.Response, err error) bool + type WagClient struct + func New(basePath string) *WagClient + func NewFromDiscovery() (*WagClient, error) + 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) Other modules containing this package github.com/Clever/wag github.com/Clever/wag/v6