Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHTTP = errors.New("HTTP Error")
ErrHTTP represents non-404 errors in HTTP requests.
Functions ¶
This section is empty.
Types ¶
type AsyncGetter ¶
type AsyncGetter interface { Get(context.Context, *GetRequest, interface{}) <-chan GetResponse Work(context.Context) error }
AsyncGetter is an interface to allow for asynchronous getting.
type BulkGetter ¶
type BulkGetter struct {
// contains filtered or unexported fields
}
BulkGetter allows batching/bulk gets.
func New ¶
func New(cfg Config) *BulkGetter
New returns a new BulkGetter, setting sensible defaults for the configuration.
func (*BulkGetter) Get ¶
func (bg *BulkGetter) Get(ctx context.Context, req *GetRequest, dst interface{}) <-chan GetResponse
Get queues a single Get() for a batching get.
type GetRequest ¶
GetRequest represents an item to GET.
func (*GetRequest) String ¶
func (r *GetRequest) String() string
type GetResponse ¶
GetResponse represents the response from a GetRequest.
type Mock ¶
Mock mocks the AsyncGetter interface.
func (*Mock) Get ¶
func (m *Mock) Get(ctx context.Context, req *GetRequest, dst interface{}) <-chan GetResponse
Get mocks a get of an AsyncGetter.
Click to show internal directories.
Click to hide internal directories.