Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrStorageKeyNotFound - returned when value is not found in storage (source or fallback cache) ErrStorageKeyNotFound = errors.New("storage: Key not found") // ErrStorageConnectionFailed - returned when there was connection error to storage (source or fallback cache) ErrStorageConnectionFailed = errors.New("storage: Connection failed") )
Functions ¶
This section is empty.
Types ¶
type ETCDCache ¶
type ETCDCache struct {
// contains filtered or unexported fields
}
ETCDCache - ETCD based key storage used as cache
func NewEtcdCache ¶
NewEtcdCache - constructor for etcd based key storage
type GithubKeys ¶
type GithubKeys struct {
Adminteam string
AdminteamID int
Userteam string
UserteamID int
// contains filtered or unexported fields
}
GithubKeys - github api as key storage
func NewGithubKeys ¶
func NewGithubKeys(token, owner, Adminteam string, AdminteamID int, Userteam string, UserteamID int) *GithubKeys
NewGithubKeys - constructor for github key storage
type NilStorage ¶
type NilStorage struct{}
NilStorage - empty key storage
func (*NilStorage) Get ¶
func (c *NilStorage) Get(name string) (value string, err error)
Get - always return not found
func (*NilStorage) Remove ¶
func (c *NilStorage) Remove(name string) (err error)
Remove - remove nothing but return nil error
func (*NilStorage) Set ¶
func (c *NilStorage) Set(name, value string) (err error)
Set - save nothing but return nil error
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy - key storage fallback proxy.
Always deal with source key storage first, and sync values with fallback cache storage
If source key storage is unavailable fallback to cache storage