memberset

package
v0.0.0-...-1704659 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

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

func New

func New(kvop *gotkv.Operator) Operator

func (*Operator) AddPeers

func (o *Operator) AddPeers(ctx context.Context, s cadata.Store, x State, peers []Peer, nonce owldag.Ref) (*State, error)

func (*Operator) Exists

func (o *Operator) Exists(ctx context.Context, s cadata.Store, x State, peer PeerID) (bool, error)

func (*Operator) Get

func (o *Operator) Get(ctx context.Context, s cadata.Getter, x State, id PeerID) (*Peer, error)

func (*Operator) List

func (o *Operator) List(ctx context.Context, s cadata.Store, x State, peer PeerID) ([]PeerID, error)

func (*Operator) Merge

func (o *Operator) Merge(ctx context.Context, s cadata.Store, xs []State) (*State, error)

func (*Operator) NewEmpty

func (o *Operator) NewEmpty(ctx context.Context, s cadata.Store, peers []PeerID) (*State, error)

func (*Operator) RemovePeers

func (o *Operator) RemovePeers(ctx context.Context, s cadata.Store, x State, peers []PeerID) (*State, error)

func (*Operator) Validate

func (o *Operator) Validate(ctx context.Context, s cadata.Getter, authorID PeerID, prev, next State) error

Validate determines if the transision is valid

type Peer

type Peer struct {
	ID       PeerID
	CanWrite bool
}

type PeerID

type PeerID = owldag.PeerID

type State

type State = gotkv.Root

Jump to

Keyboard shortcuts

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