featureset

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package featureset defines a set of global features and their rollout status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableForT

func DisableForT(t *testing.T, feature Feature)

DisableForT disables a feature for testing.

func EnableForT

func EnableForT(t *testing.T, feature Feature)

EnableForT enables a feature for testing.

func Enabled

func Enabled(feature Feature) bool

Enabled returns true if the feature is enabled.

func Init

func Init(ctx context.Context, config Config) error

Init initialises the global feature set state.

Types

type Config

type Config struct {
	// MinStatus defines the minimum enabled status.
	MinStatus string
	// Enabled overrides min status and enables a list of features.
	Enabled []string
	// Disabled overrides min status and disables a list of features.
	Disabled []string
}

Config configures the feature set package.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default config enabling only stable features.

type Feature

type Feature string

Feature is a feature being rolled out.

const (
	// QBFTConsensus introduces qbft consensus, see https://github.com/ObolNetwork/charon/issues/445.
	QBFTConsensus Feature = "qbft_consensus"
)

Jump to

Keyboard shortcuts

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