features

package
v0.0.0-...-455eedf Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureSerializedHeaders = "serialized_headers"
	FeatureQuickReconnects   = "quick_reconnects"
	FeatureAllowRemoteConfig = "allow_remote_config"
	FeatureDatagramV2        = "support_datagram_v2"
	FeaturePostQuantum       = "postquantum"
	FeatureQUICSupportEOF    = "support_quic_eof"
	FeatureManagementLogs    = "management_logs"
)

Variables

Functions

func Contains

func Contains(feature string) bool

func Dedup

func Dedup(slice []string) []string

Remove any duplicates from the slice

Types

type FeatureSelector

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

FeatureSelector determines if this account will try new features. It preiodically queries a DNS TXT record to see which features are turned on

func NewFeatureSelector

func NewFeatureSelector(ctx context.Context, accountTag string, staticFeatures StaticFeatures, logger *zerolog.Logger) (*FeatureSelector, error)

func (*FeatureSelector) PostQuantumMode

func (fs *FeatureSelector) PostQuantumMode() PostQuantumMode

type PostQuantumMode

type PostQuantumMode uint8
const (
	PostQuantumDisabled PostQuantumMode = iota
	// Prefer post quantum, but fallback if connection cannot be established
	PostQuantumPrefer
	// If the user passes the --post-quantum flag, we override
	// CurvePreferences to only support hybrid post-quantum key agreements.
	PostQuantumStrict
)

type StaticFeatures

type StaticFeatures struct {
	PostQuantumMode *PostQuantumMode
}

Features set by user provided flags

Jump to

Keyboard shortcuts

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