Documentation
¶
Index ¶
- func ConstructDAG(fileDescriptor *desc.FileDescriptor, subject string) (nodes map[string]Node, err error)
- func MergeDAGs(dags []map[string]Node) map[string]Node
- func Subject(topic string, section Section) string
- type DAGsBuilder
- type Entries
- type Entry
- type Node
- type Record
- type Records
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructDAG ¶
Types ¶
type DAGsBuilder ¶
type DAGsBuilder struct {
// contains filtered or unexported fields
}
func NewDAGsBuilder ¶
func NewDAGsBuilder() *DAGsBuilder
func (*DAGsBuilder) AddDag ¶
func (d *DAGsBuilder) AddDag(fileDescriptor *desc.FileDescriptor, subject string) error
func (*DAGsBuilder) Records ¶
func (d *DAGsBuilder) Records() (records Records, err error)
type Node ¶
type Node struct {
Subject string
Descriptor *desc.FileDescriptor
References []string
// Is this node a dependency of another node?
Dependency bool
// Level in the graph
Level int
// LevelHash contains the hash of the subject + filepath of the content so we can make the level unique
// in order to achieve a stable sort
// We use subject + filepath because in the same level we might have the same file twice one having the
// subject being the topic name and the other being the filepath itself, which could lead to the same hash.
LevelHash uint32
}
func GetDepOrder ¶
GetDepOrder returns a list of Nodes in order they should be inserted.
type Records ¶
type Records []Record
func BuildRecords ¶
BuildRecords takes a list of entries and a storer and compiles a list of records.
func GetResults ¶
Click to show internal directories.
Click to hide internal directories.