Documentation ¶
Overview ¶
Package fflags manages Solana protocol features.
The feature mechanism coordinates the activation of (breaking) changes to the Solana protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature uint
Feature is an opaque handle to a feature flag.
func Register ¶
Register creates a new application-wide feature flag for the given feature gate address. Returns an opaque handle number. Idempotent, such that the same gate address can be registered twice, returning the same handle. (Useful when a feature affects two separate modules) Not thread-safe -- should be only called from the init/main goroutine.
type Features ¶
type Features struct {
// contains filtered or unexported fields
}
Features is a set of feature flags.
func (*Features) HasFeature ¶
HasFeature returns true if the given feature flag is set.
func (*Features) WithFeature ¶
WithFeature modifies s to include the given feature flag. Returns s to support chaining-style syntax. Panics on invalid handle.
func (*Features) WithoutFeature ¶
WithoutFeature modifies s to exclude the given feature flag. Returns s to support chaining-style syntax. Panics on invalid handle.