Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ctor ¶
type Ctor struct { Name string Package string File string Line int ID CtorID Params []*Param GroupParams []*Group Results []*Result ErrorType ErrorType }
Ctor encodes a constructor provided to the container for the DOT graph.
type ErrorType ¶
type ErrorType int
ErrorType of a constructor or group is updated when they fail to build.
type FailedNodes ¶
type FailedNodes struct { // 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 // err types (err providing). RootCauses []*Result // TransitiveFailures is the list of nodes that failed to build due to // missing/failed dependencies. TransitiveFailures []*Result // contains filtered or unexported fields }
FailedNodes is the nodes that failed in the graph.
type Graph ¶
type Graph struct { Ctors []*Ctor Groups []*Group Failed *FailedNodes // contains filtered or unexported fields }
Graph is the DOT-format graph in a Container.
func (*Graph) AddMissingNodes ¶
AddMissingNodes adds missing nodes to the list of failed Results in the graph.
func (*Graph) FailGroupNodes ¶
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.
func (*Graph) FailNodes ¶
FailNodes adds results to the list of failed Results in the graph, and updates the state of the constructor with the given id accordingly.
func (*Graph) PruneSuccess ¶
func (dg *Graph) PruneSuccess()
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.
type Group ¶
type Group struct { // Type is the type of values in the group. Type reflect.Type Name string Results []*Result ErrorType ErrorType }
Group is a group node in the graph. Group represents an fx value group.
func NewGroup ¶
func NewGroup(k nodeKey) *Group
NewGroup creates a new group with information in the groupKey.
func (*Group) Attributes ¶
Attributes composes and returns a string of the Group node's attributes.
type Result ¶
type Result struct { *Node // 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. GroupIndex int }
Result is a result node in the graph. Results are the output of constructors.
func (*Result) Attributes ¶
Attributes composes and returns a string of the Result node's attributes.