Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instrumentation ¶
type Instrumentation interface { Count(key string, value int) Duration(key string, start time.Time) }
Instrumentation records the performances and events
type Logger ¶
type Logger interface { Error(message string, args ...interface{}) Warn(message string, args ...interface{}) Info(message string, args ...interface{}) Debug(message string, args ...interface{}) }
Logger logs stuff
type MyConfig ¶
type MyConfig interface { Logger() Logger Instrumentation() Instrumentation RateLimiter() RateLimiter Cache() Cache }
MyConfig defines the config for MyStruct
type MyStruct ¶
type MyStruct struct { }
MyStruct does something fantastic
func NewByConfigConstructor ¶
NewByConfigConstructor is the constructor for MyStruct
func NewLongConstructor ¶
func NewLongConstructor(logger Logger, stats Instrumentation, limiter RateLimiter, cache Cache, url string, credentials string) *MyStruct
NewLongConstructor is the constructor for MyStruct
type RateLimiter ¶
type RateLimiter interface { Acquire() Release() }
RateLimiter limits how many concurrent requests we can make or process
Click to show internal directories.
Click to hide internal directories.