Documentation
¶
Index ¶
- type PostgresStore
- func (p *PostgresStore) Close() error
- func (p *PostgresStore) Delete(ctx context.Context, key string) error
- func (p *PostgresStore) Get(ctx context.Context, key string) (*core.FeatureFlag, error)
- func (p *PostgresStore) GetAll(ctx context.Context) ([]core.FeatureFlag, error)
- func (p *PostgresStore) HealthCheck(ctx context.Context) error
- func (p *PostgresStore) Set(ctx context.Context, flag core.FeatureFlag) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
PostgresStore implements the Store interface using PostgreSQL as the backend
func NewStore ¶
func NewStore(config *config.PostgresConfig) (*PostgresStore, error)
NewPostgresStore creates a new PostgreSQL store with the given configuration
func (*PostgresStore) Close ¶
func (p *PostgresStore) Close() error
Close cleanly shuts down the store
func (*PostgresStore) Delete ¶
func (p *PostgresStore) Delete(ctx context.Context, key string) error
Delete removes a feature flag
func (*PostgresStore) Get ¶
func (p *PostgresStore) Get(ctx context.Context, key string) (*core.FeatureFlag, error)
Get retrieves a feature flag by key
func (*PostgresStore) GetAll ¶
func (p *PostgresStore) GetAll(ctx context.Context) ([]core.FeatureFlag, error)
GetAll retrieves all feature flags
func (*PostgresStore) HealthCheck ¶
func (p *PostgresStore) HealthCheck(ctx context.Context) error
HealthCheck verifies store connectivity
func (*PostgresStore) Set ¶
func (p *PostgresStore) Set(ctx context.Context, flag core.FeatureFlag) error
Set creates or updates a feature flag
Click to show internal directories.
Click to hide internal directories.