Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badger ¶
Badger storage
type Redis ¶
type Redis struct {
Conn *redis.Client
}
Redis storage
type StorageHandler ¶
type StorageHandler interface { Set(key string, value []byte, expired time.Duration) error Get(key string) ([]byte, error) Del(key string) }
func Connect ¶
func Connect(database string) (StorageHandler, error)
Connect to specified `database`, return error if given `database` are invalid or unknown or panic if failed to connect
Click to show internal directories.
Click to hide internal directories.