features

package
v0.0.0-...-845e4b4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FeatureGraphqlMockGraph by sending mocked data instead of database data.
	FeatureGraphqlMockGraph = "graphql mock demo data"

	// FeatureGraphqlMockGraphDelay by delaying the display of the mocked data.
	FeatureGraphqlMockGraphDataDelay = "graphql mock demo data delay"

	// FeatureWhitelistedOnlyPools to only show pools that we track in pools.toml.
	FeatureWhitelistedOnlyPools = "graphql whitelisted only pools"

	// FeatureIngestorPollRpc using the ingestor. Useful in environments
	// where websocket access is inconsistent or unavailable. Does so with
	// a (by default) 15 second delay, with checkpointing done in the database.
	FeatureIngestorPollRpc = "ingestor poll rpc"

	// FeatureFaucetStakersOnly to gate access to the faucet to
	// through the moderators graph.
	FeatureFaucetStakersOnly = "faucet stakers only"

	// FeatureFaucetEnabled is allowed to be used.
	FeatureFaucetEnabled = "faucet enabled"
)
View Source
const EnvFeatures = "SPN_FEATURES"

EnvFeatures to enable at runtime from env (optionally)

View Source
const FeaturesBucket = "https://features.long.so/features.json"

FeaturesBucket where a JSON blob lives that contains each enabled feature in a map.

Variables

This section is empty.

Functions

This section is empty.

Types

type F

type F struct {
	// contains filtered or unexported fields
}

Features that are supported in the code based on the bucket or env.

func Get

func Get() F

Get some feature functionality support. Make a request if it's needed, or use EnvFeatures.

func (F) Is

func (f F) Is(name string) bool

Is the feature enabled for a specific binary "yes or no" question. Will enable everything if everything is enabled for features (development mode.)

func (F) On

func (f F) On(name string, k func() error) (r error)

OnFeature being enabled, run the thunk given.

Jump to

Keyboard shortcuts

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