archive

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	ReplyList
	*forestArch.Archive
}

Archive manages a group of known arbor nodes

func NewArchive

func NewArchive(store forest.Store) (*Archive, error)

func (*Archive) Add

func (a *Archive) Add(node forest.Node) error

Add accepts an arbor node and stores it in the Archive. If it is a Reply node, it will be added to the ReplyList

type ReplyList

type ReplyList []*forest.Reply

ReplyList holds a sortable list of replies

func (ReplyList) IndexForID

func (h ReplyList) IndexForID(id *fields.QualifiedHash) int

IndexForID returns the position of the node with the given `id` inside of the ReplyList, or -1 if it is not present.

func (ReplyList) Sort

func (h ReplyList) Sort()

Jump to

Keyboard shortcuts

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