flags

package
v0.0.0-...-b9afad4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLaunchDarklyClient

func NewLaunchDarklyClient(config Config) (*ld.LDClient, error)

NewLaunchDarklyClient returns a client backed by Launch Darkly

func Principal

func Principal(ctx context.Context) lduser.User

Principal builds the LaunchDarkly user object for the currently authenticated principal.

func UserKeyForID

func UserKeyForID(id string) string

UserKeyForID generates a user key from an ID we should not be using bare EUA IDs as identifiers to LaunchDarkly (per Jimil/ISSO), so we use a cryptographically secure one-way hash of the EUA ID as "key" for the LD User object.

Types

type Config

type Config struct {
	Source         appconfig.FlagSourceOption
	Key            string
	Timeout        time.Duration
	FlagValuesFile string
}

Config has all the parts for creating a new LD Client

Jump to

Keyboard shortcuts

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