replication

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReconcileInterval time.Duration
	Workers           WorkerConfig
}

type Manager

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

Manager schedules replication workers.

func NewManager

func NewManager(e *storage.Engine, queue *storage.IndexNotificationQueue, conn *grpc.ClientConn, cfg Config) *Manager

NewManager constructs a new replication Manager out of tables.Manager, dragonboat.NodeHost and replication API grpc.ClientConn.

func (*Manager) Close

func (m *Manager) Close()

Close will stop replication goroutine - could be called just once.

func (*Manager) Collect

func (m *Manager) Collect(metrics chan<- prometheus.Metric)

func (*Manager) Describe

func (m *Manager) Describe(descs chan<- *prometheus.Desc)

func (*Manager) Start

func (m *Manager) Start() error

Start starts the replication manager goroutine, Close will stop it.

type WorkerConfig

type WorkerConfig struct {
	PollInterval        time.Duration
	LeaseInterval       time.Duration
	LogRPCTimeout       time.Duration
	SnapshotRPCTimeout  time.Duration
	MaxRecoveryInFlight int64
	MaxSnapshotRecv     uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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