conf

package
v5.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 1 Imported by: 12

Documentation

Index

Constants

View Source
const (
	// ImpressionsModeOptimized will avoid sending duplicated events
	ImpressionsModeOptimized = "optimized"
	// ImpressionsModeDebug will send all the impressions generated
	ImpressionsModeDebug = "debug"
	// ImpressionsModeNone will send only the unique keys tracked
	ImpressionsModeNone = "none"
)
View Source
const (
	// Standalone mode
	Standalone = "inmemory-standalone"
	// ProducerSync mode
	ProducerSync = "producer-sync"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedConfig

type AdvancedConfig struct {
	HTTPTimeout            int
	SegmentQueueSize       int
	SegmentWorkers         int
	SdkURL                 string
	EventsURL              string
	TelemetryServiceURL    string
	EventsBulkSize         int64
	EventsQueueSize        int
	ImpressionsQueueSize   int
	ImpressionsBulkSize    int64
	StreamingEnabled       bool
	AuthServiceURL         string
	StreamingServiceURL    string
	SplitUpdateQueueSize   int64
	SegmentUpdateQueueSize int64
	SplitsRefreshRate      int
	SegmentsRefreshRate    int
	FlagSetsFilter         []string
}

AdvancedConfig exposes more configurable parameters that can be used to further tailor the sdk to the user's needs - HTTPTimeout - Timeout for HTTP requests when doing synchronization - SegmentQueueSize - How many segments can be queued for updating (should be >= # segments the user has) - SegmentWorkers - How many workers will be used when performing segments sync.

func GetDefaultAdvancedConfig

func GetDefaultAdvancedConfig() AdvancedConfig

GetDefaultAdvancedConfig returns default conf

type RedisConfig

type RedisConfig struct {
	Host     string
	Port     int
	Database int
	Password string
	Username string
	Prefix   string

	// The network type, either tcp or unix.
	// Default is tcp.
	Network string

	// Maximum number of retries before giving up.
	// Default is to not retry failed commands.
	MaxRetries int

	// Dial timeout for establishing new connections.
	// Default is 5 seconds.
	DialTimeout int

	// Timeout for socket reads. If reached, commands will fail
	// with a timeout instead of blocking.
	// Default is 10 seconds.
	ReadTimeout int

	// Timeout for socket writes. If reached, commands will fail
	// with a timeout instead of blocking.
	// Default is 3 seconds.
	WriteTimeout int

	// Maximum number of socket connections.
	// Default is 10 connections.
	PoolSize int

	// Redis sentinel replication support
	SentinelAddresses []string
	SentinelMaster    string

	// Redis cluster replication support
	ClusterNodes      []string
	ClusterKeyHashTag string

	TLSConfig *tls.Config
}

RedisConfig struct is used to cofigure the redis parameters

type TaskPeriods

type TaskPeriods struct {
	SplitSync      int
	SegmentSync    int
	ImpressionSync int
	GaugeSync      int // deprecated
	CounterSync    int // deprecated
	LatencySync    int // deprecated
	EventsSync     int
	TelemetrySync  int
}

TaskPeriods struct is used to configure the period for each synchronization task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL