features

package
v0.0.0-...-b80b294 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EnableReplicaFeatures enables replica related features via the REPLICA
	// build time variable.
	EnableReplicaFeatures = "false"

	// EnableReplica is true when we should force replica to be enabled
	// regardless of other configuration.
	EnableReplica = false

	// EnableTrafficlogFeatures is true when the traffic log should be enabled regardless of other
	// config. This can be set at build-time using -ldflags. For example,
	//   go build -ldflags "-X github.com/getlantern/flashlight/common.EnableTrafficlogFeatures=true"
	// More commonly you'd enable this via the TRAFFICLOG build time variable.
	EnableTrafficlogFeatures = "false"

	// EnableTrafficlog is true when the traffic log should be enabled regardless of
	// other config. This can be set at build-time; see EnableTrafficlogFeatures
	EnableTrafficlog = false

	// ForcedTrafficLogOptions contains the traffic log options that should be used if the
	// traffic log is force enabled at build time.
	ForcedTrafficLogOptions = &config.TrafficLogOptions{
		CaptureBytes:               10 * 1024 * 1024,
		SaveBytes:                  10 * 1024 * 1024,
		CaptureSaveDuration:        5 * time.Minute,
		Reinstall:                  true,
		WaitTimeSinceFailedInstall: 24 * time.Hour,
		UserDenialThreshold:        3,
		TimeBeforeDenialReset:      24 * time.Hour,
		FailuresThreshold:          3,
		TimeBeforeFailureReset:     24 * time.Hour,
	}

	// EnabledFeatures is a map of features to their
	// current enabled status
	EnabledFeatures map[Feature]bool
)

Functions

This section is empty.

Types

type Feature

type Feature int

Feature represents different types of Lantern "features" that can be enabled with build time variables or environment variables

const (
	Replica Feature = iota
	Auth
	Trafficlog
)

func (Feature) String

func (f Feature) String() string

Jump to

Keyboard shortcuts

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