fetch_tree

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteVarWriter

type ByteVarWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

func (*ByteVarWriter) Write

func (w *ByteVarWriter) Write(p []byte) (n int, err error)

type Do

type Do func(nodeID string, depth int) ([]NodeInfo, error)

type NodeInfo

type NodeInfo struct {
	ID, Name string
	IsLeaf   bool
}

type NodeMap

type NodeMap map[string]string

type Tree

type Tree map[string]NodeMap

func DoParallel

func DoParallel(fetch Do, treeName, rootNodeID string, maxDepth int, thread int) (Tree, error)

func (*Tree) DecodeFrom

func (c *Tree) DecodeFrom(data []byte) error

func (*Tree) Encode

func (c *Tree) Encode(w io.Writer) error

func (*Tree) EncodeToByteVar

func (c *Tree) EncodeToByteVar() ([]byte, error)

func (*Tree) EncodeToBytes

func (c *Tree) EncodeToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

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