fsm

package
v1.31.21 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot struct {
	// NodeID is the id of the node that created the snapshot
	NodeID string `json:"node_id"`
	// SnapshotID is the id of the snapshot comes from the provided Sink
	SnapshotID string `json:"snapshot_id"`
	// LegacySchema is the old schema that was used to create the snapshot
	// it is used to restore the schema if the snapshot is not compatible with the current schema
	// note: this is not used anymore, but we keep it for backwards compatibility
	LegacySchema map[string]any `json:"classes"`
	// Schema is the new schema that will be used to restore the FSM
	Schema []byte `json:"schema,omitempty"`
	// RBAC is the rbac that will be used to restore the FSM
	RBAC []byte `json:"rbac,omitempty"`
	// DistributedTasks are the tasks that will be used to restore the FSM.
	DistributedTasks []byte `json:"distributed_tasks,omitempty"`
	// ReplicationOps are the currently ongoing operation for replica replication
	ReplicationOps []byte `json:"replication_ops,omitempty"`
	// DbUsers is the state of dynamic db users that will be used to restore the FSM
	DbUsers []byte `json:"dbusers,omitempty"`
}

Snapshot is the snapshot of the cluster FSMs (schema, rbac, etc) it is used to restore the Snapshot to a previous state, or to bring out-of-date followers up to a recent log index.

type Snapshotter

type Snapshotter interface {
	Snapshot() ([]byte, error)
	Restore([]byte) error
}

Snapshotter is used to snapshot and restore any (FSM) state

Jump to

Keyboard shortcuts

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