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()

Source Files