Update split SDK to 6.0.2 to fix sync bug (#17060)
* Update split SDK to 6.0.2 to fix sync bug * Vendor and tidy
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fa2ecad0a9
Коммит
aba00a3cfd
89
vendor/github.com/splitio/go-split-commons/v3/conf/conf.go
сгенерированный
поставляемый
Обычный файл
89
vendor/github.com/splitio/go-split-commons/v3/conf/conf.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,89 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
)
|
||||
|
||||
// RedisConfig struct is used to cofigure the redis parameters
|
||||
type RedisConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
Database int
|
||||
Password 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
|
||||
}
|
||||
|
||||
// TaskPeriods struct is used to configure the period for each synchronization task
|
||||
type TaskPeriods struct {
|
||||
SplitSync int
|
||||
SegmentSync int
|
||||
ImpressionSync int
|
||||
GaugeSync int
|
||||
CounterSync int
|
||||
LatencySync int
|
||||
EventsSync int
|
||||
}
|
||||
|
||||
// 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.
|
||||
type AdvancedConfig struct {
|
||||
HTTPTimeout int
|
||||
SegmentQueueSize int
|
||||
SegmentWorkers int
|
||||
SdkURL string
|
||||
EventsURL string
|
||||
EventsBulkSize int64
|
||||
EventsQueueSize int
|
||||
ImpressionsQueueSize int
|
||||
ImpressionsBulkSize int64
|
||||
StreamingEnabled bool
|
||||
AuthServiceURL string
|
||||
StreamingServiceURL string
|
||||
SplitUpdateQueueSize int64
|
||||
SegmentUpdateQueueSize int64
|
||||
}
|
||||
|
||||
// ManagerConfig exposes configurable parameters for ImpressionManager
|
||||
type ManagerConfig struct {
|
||||
OperationMode string
|
||||
ImpressionsMode string
|
||||
ListenerEnabled bool
|
||||
}
|
||||
52
vendor/github.com/splitio/go-split-commons/v3/conf/defaults.go
сгенерированный
поставляемый
Обычный файл
52
vendor/github.com/splitio/go-split-commons/v3/conf/defaults.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,52 @@
|
||||
package conf
|
||||
|
||||
const (
|
||||
defaultHTTPTimeout = 30
|
||||
defaultSegmentQueueSize = 500
|
||||
defaultSegmentWorkers = 10
|
||||
defaultEventsBulkSize = 5000
|
||||
defaultEventsQueueSize = 10000
|
||||
defaultImpressionsQueueSize = 10000
|
||||
defaultImpressionsBulkSize = 5000
|
||||
defaultStreamingEnabled = true
|
||||
defaultSplitUpdateQueueSize = 5000
|
||||
defaultSegmentUpdateQueueSize = 5000
|
||||
defaultAuthServiceURL = "https://auth.split.io"
|
||||
defaultEventsURL = "https://events.split.io/api"
|
||||
defaultSdkURL = "https://sdk.split.io/api"
|
||||
defaultStreamingServiceURL = "https://streaming.split.io/sse"
|
||||
)
|
||||
|
||||
const (
|
||||
// ImpressionsModeOptimized will avoid sending duplicated events
|
||||
ImpressionsModeOptimized = "optimized"
|
||||
// ImpressionsModeDebug will send all the impressions generated
|
||||
ImpressionsModeDebug = "debug"
|
||||
)
|
||||
|
||||
const (
|
||||
// Standalone mode
|
||||
Standalone = "inmemory-standalone"
|
||||
// ProducerSync mode
|
||||
ProducerSync = "producer-sync"
|
||||
)
|
||||
|
||||
// GetDefaultAdvancedConfig returns default conf
|
||||
func GetDefaultAdvancedConfig() AdvancedConfig {
|
||||
return AdvancedConfig{
|
||||
EventsQueueSize: defaultEventsQueueSize,
|
||||
HTTPTimeout: defaultHTTPTimeout,
|
||||
EventsBulkSize: defaultEventsBulkSize,
|
||||
ImpressionsBulkSize: defaultImpressionsBulkSize,
|
||||
ImpressionsQueueSize: defaultImpressionsQueueSize,
|
||||
SegmentQueueSize: defaultSegmentQueueSize,
|
||||
SegmentUpdateQueueSize: defaultSegmentUpdateQueueSize,
|
||||
SegmentWorkers: defaultSegmentWorkers,
|
||||
SplitUpdateQueueSize: defaultSplitUpdateQueueSize,
|
||||
StreamingEnabled: defaultStreamingEnabled,
|
||||
AuthServiceURL: defaultAuthServiceURL,
|
||||
EventsURL: defaultEventsURL,
|
||||
SdkURL: defaultSdkURL,
|
||||
StreamingServiceURL: defaultStreamingServiceURL,
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user