Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func BusinessLogic ¶
func BusinessLogic(h HashTable)
BusinessLogic is a sample function that does some business logic using h as the data storage system. We will test this function
Types ¶
type HashTable ¶
HashTable is the interface for a simple hash table. It's designed in such a way that some libraries immediately adhere to it with no extra code. One such library is https://godoc.org/github.com/hoisie/redis
func NewInMemoryHashTable ¶
func NewInMemoryHashTable() HashTable
type RedisClientWrapper ¶
type RedisClientWrapper struct {
Client *redis.Client
}
RedisClientWrapper is a wrapper for the Client type the the gopkg.in/redis.v3 package This type allows to redefine the Get and Set method using the parameter types and return types that match the Hashtable interface.
Click to show internal directories.
Click to hide internal directories.