-
Notifications
You must be signed in to change notification settings - Fork 76
/
env_params.go
39 lines (30 loc) · 1.3 KB
/
env_params.go
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
package envfactory
import (
"time"
"github.com/launchdarkly/ld-relay/v7/config"
"github.com/launchdarkly/ld-relay/v7/internal/relayenv"
)
// EnvironmentParams contains environment-specific information obtained from LaunchDarkly which
// will be used to configure a Relay environment in auto-configuration mode or offline mode.
//
// This is a simplified representation that does not contain all of the properties used in the
// auto-configuration or offline mode protocols, but only the ones that the core Relay logic
// needs.
type EnvironmentParams struct {
// ID is the environment ID.
EnvID config.EnvironmentID
// Identifiers contains the project and environment names and keys.
Identifiers relayenv.EnvIdentifiers
// SDKKey is the environment's SDK key; if there is more than one active key, it is the latest.
SDKKey config.SDKKey
// MobileKey is the environment's mobile key.
MobileKey config.MobileKey
// DeprecatedSDKKey is an additional SDK key that should also be allowed (but not surfaced as
// the canonical one), or "" if none. The expiry time is not represented here; it is managed
// by lower-level components.
ExpiringSDKKey config.SDKKey
// TTL is the cache TTL for PHP clients.
TTL time.Duration
// SecureMode is true if secure mode is required for this environment.
SecureMode bool
}