-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconstants.go
More file actions
77 lines (69 loc) · 3 KB
/
constants.go
File metadata and controls
77 lines (69 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package azureappconfiguration
import "time"
// Configuration client constants
const (
endpointKey string = "Endpoint"
secretKey string = "Secret"
idKey string = "Id"
)
// General configuration constants
const (
defaultLabel = "\x00"
wildCard = "*"
defaultSeparator = "."
secretReferenceContentType string = "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8"
snapshotReferenceContentType string = "application/json; profile=\"https://azconfig.io/mime-profiles/snapshot-ref\"; charset=utf-8"
featureFlagContentType string = "application/vnd.microsoft.appconfig.ff+json;charset=utf-8"
featureFlagKeyPrefix string = ".appconfig.featureflag/"
featureManagementSectionKey string = "feature_management"
featureFlagSectionKey string = "feature_flags"
)
// Feature flag constants
const (
enabledKey string = "enabled"
telemetryKey string = "telemetry"
metadataKey string = "metadata"
nameKey string = "name"
eTagKey string = "ETag"
featureFlagReferenceKey string = "FeatureFlagReference"
allocationKeyName string = "allocation"
defaultWhenEnabledKey string = "default_when_enabled"
percentileKeyName string = "percentile"
fromKeyName string = "from"
toKeyName string = "to"
seedKeyName string = "seed"
variantKeyName string = "variant"
variantsKeyName string = "variants"
configurationValueKey string = "configuration_value"
allocationIdKeyName string = "AllocationId"
conditionsKeyName string = "conditions"
clientFiltersKeyName string = "client_filters"
)
// Refresh interval constants
const (
// minimalRefreshInterval is the minimum allowed refresh interval for key-value settings
minimalRefreshInterval time.Duration = time.Second
// minimalKeyVaultRefreshInterval is the minimum allowed refresh interval for Key Vault references
minimalKeyVaultRefreshInterval time.Duration = 1 * time.Minute
)
// Failover constants
const (
tcpKey string = "tcp"
originKey string = "origin"
altKey string = "alt"
azConfigDomainLabel string = ".azconfig."
appConfigDomainLabel string = ".appconfig."
fallbackClientRefreshExpireInterval time.Duration = time.Hour
minimalClientRefreshInterval time.Duration = time.Second * 30
maxBackoffDuration time.Duration = time.Minute * 10
minBackoffDuration time.Duration = time.Second * 30
failoverTimeout time.Duration = time.Second * 10
jitterRatio float64 = 0.25
safeShiftLimit int = 63
)
// Startup constants
const (
defaultStartupTimeout time.Duration = 100 * time.Second
)