Documentation ¶
Index ¶
- type Feature
- type Manager
- func (m *Manager) Activate(feature *Feature) error
- func (m *Manager) ActivatePercentage(feature *Feature, percentage uint8) error
- func (m *Manager) ActivateTeam(teamID int64, feature *Feature) error
- func (m *Manager) Deactivate(feature *Feature) error
- func (m *Manager) DeactivateTeam(teamID int64, feature *Feature) error
- func (m *Manager) IsActive(feature *Feature) (bool, error)
- func (m *Manager) IsActiveMulti(features ...*Feature) ([]bool, error)
- func (m *Manager) IsTeamActive(teamID int64, feature *Feature) (bool, error)
- func (m *Manager) IsTeamActiveMulti(teamID int64, features ...*Feature) ([]bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
Feature represents a development feature toggle for rollout
func NewFeature ¶
NewFeature constructs a new Feature with the given name
func (*Feature) DecodeMsgpack ¶
DecodeMsgpack implements msgpack.CustomDecoder
func (*Feature) EncodeMsgpack ¶
EncodeMsgpack implements msgpack.CustomEncoder
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager persists and fetches feature toggles to/from redis
func NewManager ¶
NewManager constructs a new Manager instance
func (*Manager) ActivatePercentage ¶
ActivatePercentage activates the feature for a percentage of teams
func (*Manager) ActivateTeam ¶
ActivateTeam activates the feature for specific team
func (*Manager) Deactivate ¶
Deactivate globally deactivates the feature
func (*Manager) DeactivateTeam ¶
DeactivateTeam deactivates the feature for specific team
func (*Manager) IsActiveMulti ¶
IsActiveMulti returns whether the given features are globally active
func (*Manager) IsTeamActive ¶
IsTeamActive returns whether the given feature is active for a team