split

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Active   = "ACTIVE"
	Archived = "ARCHIVED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateResult

type UpdateResult struct {
	UpdatedSplits      []string
	ReferencedSegments []string
	NewChangeNumber    int64
	RequiresFetch      bool
}

UpdateResult encapsulates information regarding the split update performed

type Updater

type Updater interface {
	SynchronizeSplits(till *int64) (*UpdateResult, error)
	SynchronizeFeatureFlags(ffChange *dtos.SplitChangeUpdate) (*UpdateResult, error)
	LocalKill(splitName string, defaultTreatment string, changeNumber int64)
}

Updater interface

type UpdaterImpl

type UpdaterImpl struct {
	// contains filtered or unexported fields
}

UpdaterImpl struct for split sync

func NewSplitUpdater

func NewSplitUpdater(
	splitStorage storage.SplitStorage,
	splitFetcher service.SplitFetcher,
	logger logging.LoggerInterface,
	runtimeTelemetry storage.TelemetryRuntimeProducer,
	hcMonitor application.MonitorProducerInterface,
) *UpdaterImpl

NewSplitUpdater creates new split synchronizer for processing split updates

func (*UpdaterImpl) LocalKill

func (s *UpdaterImpl) LocalKill(splitName string, defaultTreatment string, changeNumber int64)

LocalKill marks a spit as killed in local storage

func (*UpdaterImpl) SynchronizeFeatureFlags

func (s *UpdaterImpl) SynchronizeFeatureFlags(ffChange *dtos.SplitChangeUpdate) (*UpdateResult, error)

func (*UpdaterImpl) SynchronizeSplits

func (s *UpdaterImpl) SynchronizeSplits(till *int64) (*UpdateResult, error)

Jump to

Keyboard shortcuts

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