forked from Flagsmith/flagsmith-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
35 lines (29 loc) · 762 Bytes
/
config.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
package flagsmith
import (
"time"
)
const (
// Number of seconds to wait for a request to
// complete before terminating the request.
DefaultTimeout = 10 * time.Second
// Default base URL for the API.
DefaultBaseURL = "https://edge.api.flagsmith.com/api/v1/"
bulkIdentifyMaxCount = 100
)
// config contains all configurable Client settings.
type config struct {
baseURL string
timeout time.Duration
localEvaluation bool
envRefreshInterval time.Duration
enableAnalytics bool
offlineMode bool
}
// defaultConfig returns default configuration.
func defaultConfig() config {
return config{
baseURL: DefaultBaseURL,
timeout: DefaultTimeout,
envRefreshInterval: time.Second * 60,
}
}