record

package
v0.0.0-...-c69f244 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	RawData []byte
	Hash    []byte
}

Node represents a record of a visited node

type Recorder

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

Recorder records the list of nodes found by Lookup.Find

func NewRecorder

func NewRecorder() *Recorder

NewRecorder creates a new recorder.

func (*Recorder) GetNodes

func (r *Recorder) GetNodes() (nodes []Node)

GetNodes returns all the nodes recorded. Note it does not copy its slice of nodes. It's fine to not copy them since the recorder is not used again after a call to GetNodes()

func (*Recorder) Record

func (r *Recorder) Record(hash, rawData []byte)

Record appends a node to the list of visited nodes.

Jump to

Keyboard shortcuts

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