Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMetadataNotUnique = errors.New("metadata field is non-unique")
ErrMetadataNotUnique indicates that the user attempted to overwrite a node metadata field.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { ID string `json:"id"` Group string `json:"group"` // contains filtered or unexported fields }
Node tracks the metadata associated with a node in the graph
func (*Node) AddMetadata ¶
AddMetadata will allow you to add metadata to the node. If the key already exists it will return ErrMetadataNotUnique to ensure immutability
func (*Node) LookupMetadata ¶
LookupMetadata extracts a metdatadata field from the node. If the value is found, it returns (value, true), and (nil, false) otherwise.
func (*Node) ShowMetadata ¶
ShowMetadata will print out the existing metadata. Used for debugging
Click to show internal directories.
Click to hide internal directories.