persister

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedMessageType     = errors.New("eventpersister: unexpected message type")
	ErrAutoOpsRulesNotFound      = errors.New("eventpersister: auto ops rules not found")
	ErrExperimentNotFound        = errors.New("eventpersister: experiment not found")
	ErrNoAutoOpsRules            = errors.New("eventpersister: no auto ops rules")
	ErrNoExperiments             = errors.New("eventpersister: no experiments")
	ErrNothingToLink             = errors.New("eventpersister: nothing to link")
	ErrInvalidGoalEventTimestamp = errors.New("eventpersister: invalid goal event timestamp")
)

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithFlushInterval

func WithFlushInterval(i time.Duration) Option

func WithFlushSize

func WithFlushSize(s int) Option

func WithFlushTimeout

func WithFlushTimeout(timeout time.Duration) Option

func WithLogger

func WithLogger(l *zap.Logger) Option

func WithMaxMPS

func WithMaxMPS(mps int) Option

func WithMetrics

func WithMetrics(r metrics.Registerer) Option

func WithNumWorkers

func WithNumWorkers(n int) Option

type Persister

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

func NewPersister

func NewPersister(
	experimentClient ec.Client,
	featureClient featureclient.Client,
	autoOpsClient aoclient.Client,
	p puller.Puller,
	ds datastore.Writer,
	bt bigtable.Client,
	mysqlClient mysql.Client,
	v3Cache cache.MultiGetDeleteCountCache,
	opts ...Option,
) *Persister

func (*Persister) Check

func (p *Persister) Check(ctx context.Context) health.Status

func (*Persister) Run

func (p *Persister) Run() error

func (*Persister) Stop

func (p *Persister) Stop()

Jump to

Keyboard shortcuts

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