Documentation ¶
Index ¶
- func AddDstNodeAsync(record Record, graph *GraphAsync, dstSet *StringSetAsync, errChan chan<- error, ...)
- func AddEdgeAsync(record Record, graph *GraphAsync, edgeSet *EdgeSetAsync, errChan chan<- error, ...)
- func AddSrcNodeAsync(record Record, graph *GraphAsync, srcSet *StringSetAsync, errChan chan<- error, ...)
- func CoordinatedGraphUpdate(record Record, o *GraphOrchestrator, wg *sync.WaitGroup)
- func CreateDOTFile(filePrefix string, g gographviz.Interface) error
- func CsvToGraph(infile string, recordProducer func(*csv.Reader, *FieldnameMap) (Record, error)) (gographviz.Interface, error)
- type AnnotatedEdge
- type EdgeSet
- type EdgeSetAsync
- type FieldnameMap
- type GraphAsync
- type GraphOrchestrator
- type Record
- type StringSet
- type StringSetAsync
- type StringSetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDstNodeAsync ¶
func AddDstNodeAsync(record Record, graph *GraphAsync, dstSet *StringSetAsync, errChan chan<- error, wg *sync.WaitGroup)
func AddEdgeAsync ¶
func AddEdgeAsync(record Record, graph *GraphAsync, edgeSet *EdgeSetAsync, errChan chan<- error, wg *sync.WaitGroup)
func AddSrcNodeAsync ¶
func AddSrcNodeAsync(record Record, graph *GraphAsync, srcSet *StringSetAsync, errChan chan<- error, wg *sync.WaitGroup)
func CoordinatedGraphUpdate ¶
func CoordinatedGraphUpdate(record Record, o *GraphOrchestrator, wg *sync.WaitGroup)
func CreateDOTFile ¶
func CreateDOTFile(filePrefix string, g gographviz.Interface) error
func CsvToGraph ¶
func CsvToGraph(infile string, recordProducer func(*csv.Reader, *FieldnameMap) (Record, error)) (gographviz.Interface, error)
Types ¶
type AnnotatedEdge ¶
type AnnotatedEdge struct{ Src, Dst, Label string }
type EdgeSet ¶
type EdgeSet map[AnnotatedEdge]struct{}
func NewEdgeSet ¶
func NewEdgeSet() *EdgeSet
func (*EdgeSet) Add ¶
func (s *EdgeSet) Add(elem AnnotatedEdge)
func (*EdgeSet) Has ¶
func (s *EdgeSet) Has(elem AnnotatedEdge) bool
type EdgeSetAsync ¶
func NewEdgeSetAsync ¶
func NewEdgeSetAsync() *EdgeSetAsync
func (*EdgeSetAsync) Add ¶
func (s *EdgeSetAsync) Add(elem AnnotatedEdge)
func (*EdgeSetAsync) Has ¶
func (s *EdgeSetAsync) Has(elem AnnotatedEdge) bool
type FieldnameMap ¶
mapping of csv column numbers to their respective field names
func CsvExtractFieldnames ¶
func CsvExtractFieldnames(fh *csv.Reader) (*FieldnameMap, error)
func NewFieldnameMap ¶
func NewFieldnameMap() *FieldnameMap
func (FieldnameMap) UpdateFromSlice ¶
func (f FieldnameMap) UpdateFromSlice(s []string) (*FieldnameMap, error)
Note: Update expects a []string of fieldnames, and then imports each string and position into the map
This most useful when paired with something like csv.Reader.Read(), which returns []string
type GraphAsync ¶
type GraphAsync struct { gographviz.Graph sync.RWMutex }
func NewGraphAsync ¶
func NewGraphAsync() *GraphAsync
type GraphOrchestrator ¶
type GraphOrchestrator struct { Metadata map[string]string // only use this for arbitrary metadata not compatible with DOT attributes; otherwise use Graph.Attrs Graph *GraphAsync SrcSet *StringSetAsync DstSet *StringSetAsync EdgeSet *EdgeSetAsync Errors chan error }
func NewGraphOrchestrator ¶
func NewGraphOrchestrator() (*GraphOrchestrator, error)
type Record ¶
func CsvProduceRecord ¶
func CsvProduceRecord(fh *csv.Reader, fnames *FieldnameMap) (Record, error)
type StringSet ¶
type StringSet map[string]struct{}
func NewStringSet ¶
func NewStringSet() *StringSet
type StringSetAsync ¶
func NewStringSetAsync ¶
func NewStringSetAsync() *StringSetAsync
func (*StringSetAsync) Add ¶
func (s *StringSetAsync) Add(elem string)
func (*StringSetAsync) Has ¶
func (s *StringSetAsync) Has(elem string) bool
type StringSetter ¶
Click to show internal directories.
Click to hide internal directories.