Documentation ¶
Overview ¶
Package toposort provides a topological sort for segments/flags based on their dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sort ¶
func Sort(allData []st.Collection) []st.Collection
Sort performs a topological sort on the given data collections, so that the items can be inserted into a persistent store to minimize the risk of evaluating a flag before its prerequisites/segments have been stored.
Types ¶
type AdjacencyList ¶
AdjacencyList is a map of vertices (kind/key) to neighbors (dependencies).
type Neighbors ¶
type Neighbors map[Vertex]struct{}
Neighbors is a set of vertices. It is used instead of a list for efficient lookup.
func GetNeighbors ¶
func GetNeighbors(kind st.DataKind, fromItem st.ItemDescriptor) Neighbors
GetNeighbors returns all direct neighbors of the given item.
Click to show internal directories.
Click to hide internal directories.