ffx

package
v1.0.0-beta.225 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ffx provides a simple feature flag service.

Index

Constants

This section is empty.

Variables

View Source
var ErrContextMissing = fmt.Errorf("access not found in context")

Functions

func SetAccessOnContext

func SetAccessOnContext(ctx context.Context, access AccessConfig) context.Context

Types

type AccessConfig

type AccessConfig map[Feature]bool

func GetAccessFromContext

func GetAccessFromContext(ctx context.Context) (AccessConfig, error)

func (AccessConfig) Merge

func (c AccessConfig) Merge(other AccessConfig) AccessConfig

type Feature

type Feature string

type Service

type Service interface {
	IsFeatureEnabled(ctx context.Context, feature Feature) (bool, error)
}

func NewContextService

func NewContextService() Service

func NewStaticService

func NewStaticService(config AccessConfig) Service

func NewTestContextService

func NewTestContextService(defaultAccess AccessConfig) Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL