package dot

Import Path
	go.uber.org/dig/internal/dot (on go.dev)

Dependency Relation
	imports 2 packages, and imported by one package

Involved Source Files graph.go
Package-Level Type Names (total 9)
/* sort by: | */
Ctor encodes a constructor provided to the container for the DOT graph. ErrorType ErrorType File string GroupParams []*Group ID CtorID Line int Name string Package string Params []*Param Results []*Result func (*Graph).AddCtor(c *Ctor, paramList []*Param, resultList []*Result)
CtorID is a unique numeric identifier for constructors. func (*Graph).FailGroupNodes(name string, t reflect.Type, id CtorID) func (*Graph).FailNodes(results []*Result, id CtorID)
ErrorType of a constructor or group is updated when they fail to build. Color returns the color representation of each ErrorType.
FailedNodes is the nodes that failed in the graph. RootCauses is a list of the point of failures. They are the root causes of failed invokes and can be either missing types (not provided) or error types (error providing). TransitiveFailures is the list of nodes that failed to build due to missing/failed dependencies.
Graph is the DOT-format graph in a Container. Ctors []*Ctor Failed *FailedNodes Groups []*Group AddCtor adds the constructor with paramList and resultList into the graph. AddMissingNodes adds missing nodes to the list of failed Results in the graph. FailGroupNodes finds and adds the failed grouped nodes to the list of failed Results in the graph, and updates the state of the group and constructor with the given id accordingly. FailNodes adds results to the list of failed Results in the graph, and updates the state of the constructor with the given id accordingly. PruneSuccess removes elements from the graph that do not have failed results. Removing elements that do not have failing results makes the graph easier to debug, since non-failing nodes and edges can clutter the graph and don't help the user debug. func NewGraph() *Graph
Group is a group node in the graph. Group represents an fx value group. ErrorType ErrorType Name string Results []*Result Type is the type of values in the group. Attributes composes and returns a string of the Group node's attributes. String implements fmt.Stringer for Group. *Group : expvar.Var *Group : fmt.Stringer func NewGroup(k nodeKey) *Group
Node is a single node in a graph and is embedded into Params and Results. Group string Name string Type reflect.Type
Param is a parameter node in the graph. Parameters are the input to constructors. Node *Node Node.Group string Node.Name string Node.Type reflect.Type Optional bool String implements fmt.Stringer for Param. *Param : expvar.Var *Param : fmt.Stringer func (*Graph).AddCtor(c *Ctor, paramList []*Param, resultList []*Result)
Result is a result node in the graph. Results are the output of constructors. GroupIndex is added to differentiate grouped values from one another. Since grouped values have the same type and group, their Node / string representations are the same so we need indices to uniquely identify the values. Node *Node Node.Group string Node.Name string Node.Type reflect.Type Attributes composes and returns a string of the Result node's attributes. String implements fmt.Stringer for Result. *Result : expvar.Var *Result : fmt.Stringer func (*Graph).AddCtor(c *Ctor, paramList []*Param, resultList []*Result) func (*Graph).AddMissingNodes(results []*Result) func (*Graph).FailNodes(results []*Result, id CtorID)
Package-Level Functions (total 2)
NewGraph creates an empty graph.
NewGroup creates a new group with information in the groupKey.