Documentation
¶
Overview ¶
Package interfaces defines the behaviour of shared services
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface {
// Connect to the queue
Connect() error
// Set a float value at key
Set(key string, value interface{}) error
// Get an float value at key
GetFloat64(key string) (float64, error)
// IncrementBy increments the value at key by the given value
IncrementBy(key string, value int64) error
// Delete a key
Delete(key string) error
// Disconnect from the queue
Disconnect() error
}
Cacher defines the available actions for caches
type Queuer ¶
type Queuer interface {
// Connect to the queue
Connect() error
// Push pushes data onto the queue at key
Push(string, []byte) error
// PushMany pushes multiple items onto the queue at key
PushMany(string, [][]byte) error
// Fetch retrieves a single item from the queue at key and returns a
// byte slice of data
Fetch(string) ([]byte, error)
// FetchMany retrieves up to the specified count from the queue at key and
// returns a slive of byte slices
FetchMany(string, int) ([][]byte, error)
// CountItems counts the amount of items in the given queue
CountItems(string) (int, error)
// Purge all items from the given queue
Purge(string) error
// Disconnect from the queue
Disconnect() error
}
Queuer defines the available actions for queues
Click to show internal directories.
Click to hide internal directories.