filaments

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicEntry

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

func NewAtomicEntry

func NewAtomicEntry(entry *WriteEntry) AtomicEntry

func (*AtomicEntry) CmpAndSwap

func (p *AtomicEntry) CmpAndSwap(expected, new *WriteEntry) bool

func (*AtomicEntry) Get

func (p *AtomicEntry) Get() *WriteEntry

func (*AtomicEntry) Set

func (p *AtomicEntry) Set(v *WriteEntry)

func (*AtomicEntry) Swap

func (p *AtomicEntry) Swap(v *WriteEntry) *WriteEntry

type LocalSegment

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

func NewLatest

func NewLatest(entry *WriteEntry, lifelineRoot reference.Holder, filamentRoot reference.Holder,
	filamentSection dropbag.JetSectionId,
) *LocalSegment

func (*LocalSegment) AddNext

func (p *LocalSegment) AddNext(entry *WriteEntry)

func (*LocalSegment) GetLatest

func (p *LocalSegment) GetLatest() *WriteEntry

func (*LocalSegment) Update

func (p *LocalSegment) Update(entry *WriteEntry)

type WriteEntry

type WriteEntry struct {
	Key reference.Holder

	// local or remote
	// remote may have Prev = nil if prev is not read
	Prev   *WriteEntry
	Next   AtomicEntry
	Latest *LocalSegment // FilamentSegment

	EventSeq     uint32 // per JetDrop
	DirectorySeq uint32 // per JetDrop, index in Merkle tree
	FilamentSeq  uint64 // sequence through the whole filament, first entry =1, zero is invalid

	BodyHash    cryptkit.Digest
	BodySection dropbag.JetSectionId
	Body        *WriteEntryBody

	ProducerSignature  cryptkit.Signature // over BodyRecordHash + (?)AuthRecordHash
	RegistrarSignature cryptkit.Signature // over ProducerSignature + Sequences + Prev.Key.Local (EntryHash)
}

func (*WriteEntry) FilamentRoot

func (p *WriteEntry) FilamentRoot() reference.Holder

func (*WriteEntry) FilamentSection

func (p *WriteEntry) FilamentSection() dropbag.JetSectionId

func (*WriteEntry) LifelineRoot

func (p *WriteEntry) LifelineRoot() reference.Holder

type WriteEntryBody

type WriteEntryBody struct {
	ProducerNode  reference.Holder // TODO make specific type for Node ref
	RegistrarNode reference.Holder // TODO make specific type for Node ref

	LifelineRoot reference.Holder
}

Jump to

Keyboard shortcuts

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