Documentation ¶
Index ¶
- Constants
- func GetClientID() string
- func GetCustomerID() string
- func GetGuardConfig(ctx context.Context, guard string) (*hubv1.GuardConfig, hubv1.Config, error)
- func GetGuardConfigs(ctx context.Context, skipPoll bool)
- func GetServiceConfig(ctx context.Context, skipPoll bool)
- func GetServiceEnvironment() string
- func GetServiceKey() string
- func GetServiceName() string
- func GetServiceRelease() string
- func GetStanzaTracer() *trace.Tracer
- func InstrumentationMetricVersion() metric.MeterOption
- func InstrumentationName() string
- func InstrumentationTraceVersion() trace.TracerOption
- func NewStanzaTracer() *trace.Tracer
- func NewState(ctx context.Context, hubUri, svcKey, svcName, svcEnv, svcRel string, ...) func()
- func OtelEnabled() bool
- func OtelStartup(ctx context.Context, skipPoll bool)
- func QuotaServiceClient() hubv1grpc.QuotaServiceClient
- func SentinelEnabled() bool
- func SentinelStartup(ctx context.Context)
- func UserAgent() string
- func XStanzaKey() metadata.MD
- type StanzaMeter
Constants ¶
View Source
const BEARER_TOKEN_REFRESH_INTERVAL = 20 * 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 GetGuardConfigs ¶
func GetServiceConfig ¶
func GetServiceEnvironment ¶
func GetServiceEnvironment() string
func GetServiceKey ¶
func GetServiceKey() string
func GetServiceName ¶
func GetServiceName() string
func GetServiceRelease ¶
func GetServiceRelease() string
func GetStanzaTracer ¶
func InstrumentationMetricVersion ¶
func InstrumentationMetricVersion() metric.MeterOption
func InstrumentationName ¶
func InstrumentationName() string
func InstrumentationTraceVersion ¶
func InstrumentationTraceVersion() trace.TracerOption
func NewStanzaTracer ¶
func OtelEnabled ¶
func OtelEnabled() bool
func OtelStartup ¶
func QuotaServiceClient ¶
func QuotaServiceClient() hubv1grpc.QuotaServiceClient
func SentinelEnabled ¶
func SentinelEnabled() bool
func SentinelStartup ¶
func XStanzaKey ¶
Types ¶
type StanzaMeter ¶
type StanzaMeter struct { AllowedCount metric.Int64Counter AllowedSuccessCount metric.Int64Counter AllowedFailureCount metric.Int64Counter AllowedUnknownCount metric.Int64Counter AllowedDuration metric.Float64Histogram BlockedCount metric.Int64Counter FailOpenCount metric.Int64Counter }
func GetStanzaMeter ¶
func GetStanzaMeter() *StanzaMeter
func NewStanzaMeter ¶
func NewStanzaMeter() *StanzaMeter
Click to show internal directories.
Click to hide internal directories.