-
-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathconfig_exporter.go
36 lines (28 loc) · 1.11 KB
/
config_exporter.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
package ffclient
import (
"time"
"github.com/thomaspoignant/go-feature-flag/exporter"
)
type ExporterEventType = string
const (
TrackingEventExporter ExporterEventType = "tracking"
FeatureEventExporter ExporterEventType = "feature"
)
// DataExporter is the configuration of your export target.
type DataExporter struct {
// FlushInterval is the interval we are waiting to export the data.
// example: if you set your FlushInterval to 1 minutes, we will send
// the data every minute unless we reach the max event in cache before.
FlushInterval time.Duration
// MaxEventInMemory is the maximum number of event you keep in the cache
// before sending the data to the Exporter.
// We will send the data when the MaxEventInMemory is reach or if we have
// waited the FlushInterval.
MaxEventInMemory int64
// Exporter is the configuration of your exporter.
// You can see all available exporter in the exporter package.
Exporter exporter.CommonExporter
// ExporterEventType is the type of event the exporter is expecting.
// The default type if not set is FeatureEventExporter.
ExporterEventType ExporterEventType
}