tree

package
v0.0.0-...-76b4aa3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 1 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 {
	Shard    *dynamodbstreams.Shard `json:"shard"`
	Parent   *Node                  `json:"-"`
	Children []*Node                `json:"children"`
}

Node contains a Shard and all its descendants

func Parse

func Parse(shards []*dynamodbstreams.Shard) *Node

Parse the complete shard list and reassemble it into a tree structure

func (*Node) DFS

func (n *Node) DFS(fn func(shard *dynamodbstreams.Shard) bool)

DFS depth first search; true indicates to descend to children

func (*Node) Find

func (n *Node) Find(shardID *string) (*Node, bool)

Find the shard with the specified id

Jump to

Keyboard shortcuts

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