global

package
v0.0.4-beta Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BEARER_TOKEN_REFRESH_INTERVAL = 4 * time.Hour

Set to less than the maximum duration of the Auth0 Bearer Token

View Source
const BEARER_TOKEN_REFRESH_JITTER = 600 // seconds
View Source
const GUARD_CONFIG_REFRESH_INTERVAL = 30 * time.Second

Set to how often we poll Hub for a new Guard Config

View Source
const GUARD_CONFIG_REFRESH_JITTER = 6 // seconds
View Source
const (
	MIN_POLLING_TIME = 15 * time.Second
)
View Source
const SERVICE_CONFIG_REFRESH_INTERVAL = 30 * time.Second

Set to how often we poll Hub for a new Service Config

View Source
const SERVICE_CONFIG_REFRESH_JITTER = 6 // seconds

Variables

This section is empty.

Functions

func GetClientID

func GetClientID() string

func GetCustomerID

func GetCustomerID() string

func GetGuardConfig

func GetGuardConfig(ctx context.Context, guard string) *hubv1.GuardConfig

func GetGuardConfigs

func GetGuardConfigs(ctx context.Context, skipPoll bool)

func GetNewBearerToken

func GetNewBearerToken(ctx context.Context) bool

func GetServiceConfig

func GetServiceConfig(ctx context.Context, skipPoll bool)

func GetServiceEnvironment

func GetServiceEnvironment() string

func GetServiceKey

func GetServiceKey() string

func GetServiceName

func GetServiceName() string

func GetServiceRelease

func GetServiceRelease() string

func InstrumentationMetricVersion

func InstrumentationMetricVersion() metric.MeterOption

func InstrumentationName

func InstrumentationName() string

func InstrumentationTraceVersion

func InstrumentationTraceVersion() trace.TracerOption

func NewState

func NewState(ctx context.Context, hubUri, svcKey, svcName, svcEnv, svcRel string, guards []string) func()

func OtelEnabled

func OtelEnabled() bool

func OtelStartup

func OtelStartup(ctx context.Context) func()

func QuotaServiceClient

func QuotaServiceClient() hubv1.QuotaServiceClient

func SentinelEnabled

func SentinelEnabled() bool

func SentinelStartup

func SentinelStartup(ctx context.Context) func()

func UserAgent

func UserAgent() string

func XStanzaKey

func XStanzaKey() metadata.MD

Types

This section is empty.

Jump to

Keyboard shortcuts

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