Documentation
¶
Index ¶
- Constants
- type BlobStore
- type Manager
- func (m *Manager) Client() *ffclient.GoFeatureFlag
- func (m *Manager) Close()
- func (m *Manager) CreateServing(ctx context.Context, service string, status ServingStatus) error
- func (m *Manager) DeleteServing(ctx context.Context, service string) error
- func (m *Manager) Dump(ctx context.Context) (map[string]dto.DTO, error)
- func (m *Manager) GetServing(ctx context.Context, service string) (ServingStatus, error)
- func (m *Manager) IsServing(ctx context.Context, service string) (bool, error)
- func (m *Manager) SetServing(ctx context.Context, service string, status ServingStatus) error
- type Option
- type ServingStatus
Constants ¶
const ( METADATA_KIND = "kind" SERVING_METADATA_KIND = "operational-serving" SERVING_FLAG_SUFFIX = "serving" SERVING_STATUS_SERVING ServingStatus = "serving" SERVING_STATUS_NOT_SERVING ServingStatus = "not-serving" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobStore ¶
type BlobStore struct {
// contains filtered or unexported fields
}
BlobStore holds the components of a feature flag storage location.
func NewBlobStore ¶
NewBlobStore parses the input URI and returns a new BlobStore instance.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides methods to manage and evaluate feature flags.
func NewManager ¶
NewManager initializes a new Manager with the provided storage URI and options.
func (*Manager) Client ¶
func (m *Manager) Client() *ffclient.GoFeatureFlag
Client provides access to the initialized go-feature-flag evaluation client.
func (*Manager) Close ¶
func (m *Manager) Close()
Close gracefully shuts down the underlying feature flag client.
func (*Manager) CreateServing ¶
CreateServing initializes a new serving flag for the specified service with the given status.
func (*Manager) DeleteServing ¶
DeleteServing permanently removes the serving flag for the specified service.
func (*Manager) Dump ¶
Dump loads and returns all current feature flags from the underlying storage.
func (*Manager) GetServing ¶
GetServing retrieves the ServingStatus for the specified service.
func (*Manager) IsServing ¶
IsServing returns true if the specified service is currently serving traffic.
func (*Manager) SetServing ¶
SetServing updates the ServingStatus for an existing service, altering its serving state.
type Option ¶
type Option func(*Manager)
Option is a functional option pattern for configuring a Manager.
func WithRefresh ¶
WithRefresh configures the cache polling interval for the Manager.
type ServingStatus ¶
type ServingStatus string
ServingStatus represents the current serving state of a service.
func (ServingStatus) String ¶
func (s ServingStatus) String() string
String returns the string representation of the ServingStatus.
func (ServingStatus) StringP ¶
func (s ServingStatus) StringP() *string
StringP returns a pointer to the string representation of the ServingStatus.