Documentation ¶
Index ¶
- func LoadModule(ctx context.Context, workspace *resources.Workspace, module *resources.Module) (*basev0.Module, error)
- func LoadService(ctx context.Context, workspace *resources.Workspace, module *resources.Module, ...) (*basev0.Service, error)
- func LoadWorkspace(ctx context.Context, workspace *resources.Workspace) (*basev0.Workspace, error)
- func ToGraphResponse(g *DAG) *observabilityv0.GraphResponse
- func ToType(t any) observabilityv0.GraphNode_Type
- type DAG
- func (g *DAG) AddEdge(u, v string)
- func (g *DAG) AddNode(u string) *WrappedNode
- func (g *DAG) Children(startNode string) []Node
- func (g *DAG) EdgeString(edge Edge) string
- func (g *DAG) Edges() []Edge
- func (g *DAG) HasEdge(from string, to string) bool
- func (g *DAG) HasNode(node string) bool
- func (g *DAG) Invert() *DAG
- func (g *DAG) Node(node string) *Node
- func (g *DAG) NodeFrom(node string) []Node
- func (g *DAG) Nodes() []Node
- func (g *DAG) Parents(s string) []Node
- func (g *DAG) Print() string
- func (g *DAG) PrintAsDot() string
- func (g *DAG) ReachableFrom(startNode string, endNode string) bool
- func (g *DAG) SortedChildren(startNode string) ([]Node, error)
- func (g *DAG) SortedParents(endNode string) ([]Node, error)
- func (g *DAG) SubGraphFrom(startNode string) (*DAG, error)
- func (g *DAG) SubGraphTo(endNode string) (*DAG, error)
- func (g *DAG) TopologicalSort() ([]Node, error)
- func (g *DAG) TopologicalSortFrom(startNode string) ([]Node, error)
- func (g *DAG) TopologicalSortTo(endNode string) ([]Node, error)
- func (g *DAG) Verb() string
- func (g *DAG) WithRelationVerb(verb string)
- type DependencyOption
- type DependencyOptions
- type Edge
- type Node
- type Service
- type ServiceDependencies
- func (d *ServiceDependencies) Dependencies() []ServiceDependency
- func (d *ServiceDependencies) DependsOn(unique string, other string) (bool, error)
- func (d *ServiceDependencies) DirectDependents(ctx context.Context, unique string) ([]Service, error)
- func (d *ServiceDependencies) DirectRequires(ctx context.Context, unique string) ([]Service, error)
- func (d *ServiceDependencies) EntryPoints(_ context.Context) ([]Service, error)
- func (d *ServiceDependencies) OrderTo(ctx context.Context, unique string) ([]Service, error)
- func (d *ServiceDependencies) Print() string
- func (d *ServiceDependencies) Restrict(_ context.Context, unique string) (*ServiceDependencies, error)
- func (d *ServiceDependencies) ServiceFromUnique(unique string) (*resources.Service, error)
- func (d *ServiceDependencies) Services() []Service
- type ServiceDependency
- type WrappedNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadModule ¶ added in v0.1.112
func LoadService ¶
func LoadWorkspace ¶ added in v0.1.112
func ToGraphResponse ¶ added in v0.0.65
func ToGraphResponse(g *DAG) *observabilityv0.GraphResponse
func ToType ¶ added in v0.0.80
func ToType(t any) observabilityv0.GraphNode_Type
Types ¶
type DAG ¶ added in v0.1.112
type DAG struct { Name string // contains filtered or unexported fields }
func LoadPublicModuleGraph ¶ added in v0.1.112
func (*DAG) AddNode ¶ added in v0.1.112
func (g *DAG) AddNode(u string) *WrappedNode
func (*DAG) EdgeString ¶ added in v0.1.112
func (*DAG) PrintAsDot ¶ added in v0.1.112
func (*DAG) ReachableFrom ¶ added in v0.1.112
ReachableFrom returns true if the endNode is reachable from the startNode
func (*DAG) SortedChildren ¶ added in v0.1.112
func (*DAG) SortedParents ¶ added in v0.1.112
func (*DAG) SubGraphFrom ¶ added in v0.1.112
SubGraphFrom returns a subgraph that contains all nodes that are reachable from the given node.
func (*DAG) TopologicalSort ¶ added in v0.1.112
func (*DAG) TopologicalSortFrom ¶ added in v0.1.112
func (*DAG) TopologicalSortTo ¶ added in v0.1.112
func (*DAG) WithRelationVerb ¶ added in v0.1.112
type DependencyOption ¶ added in v0.1.139
type DependencyOption func(*DependencyOptions) error
func SkipDependencyFor ¶ added in v0.1.139
func SkipDependencyFor(services ...string) DependencyOption
type DependencyOptions ¶ added in v0.1.139
type ServiceDependencies ¶ added in v0.1.112
type ServiceDependencies struct { Workspace *resources.Workspace // contains filtered or unexported fields }
func NewServiceDependencies ¶ added in v0.1.112
func NewServiceDependencies(ctx context.Context, workspace *resources.Workspace, opts ...DependencyOption) (*ServiceDependencies, error)
func (*ServiceDependencies) Dependencies ¶ added in v0.1.112
func (d *ServiceDependencies) Dependencies() []ServiceDependency
func (*ServiceDependencies) DependsOn ¶ added in v0.1.112
func (d *ServiceDependencies) DependsOn(unique string, other string) (bool, error)
DependsOn returns true if the service identified by unique depends on the service identified by other
func (*ServiceDependencies) DirectDependents ¶ added in v0.1.112
func (d *ServiceDependencies) DirectDependents(ctx context.Context, unique string) ([]Service, error)
DirectDependents returns the list of services that are directly dependent on the service identified by unique Result is sorted by topological order
func (*ServiceDependencies) DirectRequires ¶ added in v0.1.112
DirectRequires returns the list of services that are directly required by the service identified by unique Result is sorted by topological order
func (*ServiceDependencies) EntryPoints ¶ added in v0.1.112
func (d *ServiceDependencies) EntryPoints(_ context.Context) ([]Service, error)
EntryPoints returns the list of services that are not required by any other service
func (*ServiceDependencies) OrderTo ¶ added in v0.1.112
OrderTo returns the list of services "required" to end up with the service identified by unique.
func (*ServiceDependencies) Print ¶ added in v0.1.112
func (d *ServiceDependencies) Print() string
func (*ServiceDependencies) Restrict ¶ added in v0.1.112
func (d *ServiceDependencies) Restrict(_ context.Context, unique string) (*ServiceDependencies, error)
Restrict restricts the dependencies to the services required by the service identified by unique
func (*ServiceDependencies) ServiceFromUnique ¶ added in v0.1.112
func (d *ServiceDependencies) ServiceFromUnique(unique string) (*resources.Service, error)
func (*ServiceDependencies) Services ¶ added in v0.1.112
func (d *ServiceDependencies) Services() []Service
type ServiceDependency ¶ added in v0.1.112
type WrappedNode ¶ added in v0.1.112
type WrappedNode struct {
// contains filtered or unexported fields
}
func (*WrappedNode) WithType ¶ added in v0.1.112
func (w *WrappedNode) WithType(t any) *WrappedNode
func (*WrappedNode) WithTypeOf ¶ added in v0.1.112
func (w *WrappedNode) WithTypeOf(node string)