abd

package
v0.0.0-...-6823d0b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetPhase state = iota
	SetPhase
	Done
)

states of each instance

Variables

This section is empty.

Functions

This section is empty.

Types

type Get

type Get struct {
	ID  paxi.ID
	CID int
	Key paxi.Key
}

Get message

type GetReply

type GetReply struct {
	ID      paxi.ID
	CID     int
	Key     paxi.Key
	Value   paxi.Value
	Version int
}

GetReply message returns value and version

type Replica

type Replica struct {
	paxi.Node
	// contains filtered or unexported fields
}

Replica implements ABD atomic storage protocol Each read and write operation proceed in Get and Set phase

func NewReplica

func NewReplica(id paxi.ID) *Replica

NewReplica generates ABD replica

type Set

type Set struct {
	ID      paxi.ID
	CID     int
	Key     paxi.Key
	Value   paxi.Value
	Version int
}

Set message

type SetReply

type SetReply struct {
	ID  paxi.ID
	CID int
	Key paxi.Key
}

SetReply acknowledges a set operation, whether succeed or not

Jump to

Keyboard shortcuts

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