Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string Username string Password string Environment string PollingInterval time.Duration }
Config is used to parameterize a client
type Feature ¶
type Feature struct { CreatedAt time.Time `json:"created_at"` Name string `json:"name"` Status map[string]bool `json:"status"` }
Feature represents a Feature.
type FeatureCache ¶
type FeatureCache struct {
// contains filtered or unexported fields
}
FeatureCache is a in-memory threadsafe cache for Features.
func NewFeatureCache ¶
func NewFeatureCache() *FeatureCache
NewFeatureCache creates a new FeatureCache.
func (*FeatureCache) Add ¶
func (fc *FeatureCache) Add(feature *Feature)
Add adds a feature to the cache.
func (*FeatureCache) AddAll ¶
func (fc *FeatureCache) AddAll(features []*Feature)
AddAll adds a list of features to the cache.
func (*FeatureCache) Get ¶
func (fc *FeatureCache) Get(name string) *Feature
Get gets a Feature from the cache if it exits.
func (*FeatureCache) GetAll ¶
func (fc *FeatureCache) GetAll() map[string]*Feature
Click to show internal directories.
Click to hide internal directories.