replications

package
v2.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBucketService

func NewBucketService(log *zap.Logger, bucketSvc influxdb.BucketService, deleter ReplicationDeleter) *bucketService

func NewService

func NewService(sqlStore *sqlite.SqlStore, bktSvc BucketService, localWriter storage.PointsWriter, log *zap.Logger, enginePath string, instanceID string) (*service, *metrics.ReplicationsMetrics)

Types

type BucketService

type BucketService interface {
	RLock()
	RUnlock()
	FindBucketByID(ctx context.Context, id platform.ID) (*influxdb.Bucket, error)
}

type DurableQueueManager

type DurableQueueManager interface {
	InitializeQueue(replicationID platform.ID, maxQueueSizeBytes int64, orgID platform.ID, localBucketID platform.ID, maxAge int64) error
	DeleteQueue(replicationID platform.ID) error
	UpdateMaxQueueSize(replicationID platform.ID, maxQueueSizeBytes int64) error
	CurrentQueueSizes(ids []platform.ID) (map[platform.ID]int64, error)
	RemainingQueueSizes(ids []platform.ID) (map[platform.ID]int64, error)
	StartReplicationQueues(trackedReplications map[platform.ID]*influxdb.TrackedReplication) error
	CloseAll() error
	EnqueueData(replicationID platform.ID, data []byte, numPoints int) error
	GetReplications(orgId platform.ID, localBucketID platform.ID) []platform.ID
}

type ReplicationDeleter

type ReplicationDeleter interface {
	// DeleteBucketReplications deletes all replications registered to the local bucket
	// with the given ID.
	DeleteBucketReplications(context.Context, platform.ID) error
}

type ReplicationValidator

type ReplicationValidator interface {
	ValidateReplication(context.Context, *influxdb.ReplicationHTTPConfig) error
}

type ServiceStore

type ServiceStore interface {
	Lock()
	Unlock()
	ListReplications(context.Context, influxdb.ReplicationListFilter) (*influxdb.Replications, error)
	CreateReplication(context.Context, platform.ID, influxdb.CreateReplicationRequest) (*influxdb.Replication, error)
	GetReplication(context.Context, platform.ID) (*influxdb.Replication, error)
	UpdateReplication(context.Context, platform.ID, influxdb.UpdateReplicationRequest) (*influxdb.Replication, error)
	DeleteReplication(context.Context, platform.ID) error
	PopulateRemoteHTTPConfig(context.Context, platform.ID, *influxdb.ReplicationHTTPConfig) error
	GetFullHTTPConfig(context.Context, platform.ID) (*influxdb.ReplicationHTTPConfig, error)
	DeleteBucketReplications(context.Context, platform.ID) ([]platform.ID, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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