architecture

package
v0.1.113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadModule added in v0.1.112

func LoadModule(ctx context.Context, workspace *resources.Workspace, mod *resources.Module) (*basev0.Module, error)

func LoadService

func LoadService(ctx context.Context, workspace *resources.Workspace, service *resources.Service) (*basev0.Service, error)

func LoadWorkspace added in v0.1.112

func LoadWorkspace(ctx context.Context, workspace *resources.Workspace) (*basev0.Workspace, error)

func ToGraphResponse added in v0.0.65

func ToGraphResponse(g *DAG) *observabilityv0.GraphResponse

func ToType added in v0.0.80

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 LoadPublicModuleGraph(ctx context.Context, workspace *resources.Workspace) ([]*DAG, error)

func NewDAG added in v0.1.112

func NewDAG(name string) *DAG

func (*DAG) AddEdge added in v0.1.112

func (g *DAG) AddEdge(u, v string)

func (*DAG) AddNode added in v0.1.112

func (g *DAG) AddNode(u string) *WrappedNode

func (*DAG) Children added in v0.1.112

func (g *DAG) Children(startNode string) []Node

func (*DAG) EdgeString added in v0.1.112

func (g *DAG) EdgeString(edge Edge) string

func (*DAG) Edges added in v0.1.112

func (g *DAG) Edges() []Edge

func (*DAG) HasEdge added in v0.1.112

func (g *DAG) HasEdge(from string, to string) bool

func (*DAG) HasNode added in v0.1.112

func (g *DAG) HasNode(node string) bool

func (*DAG) Invert added in v0.1.112

func (g *DAG) Invert() *DAG

func (*DAG) Node added in v0.1.112

func (g *DAG) Node(node string) *Node

func (*DAG) NodeFrom added in v0.1.112

func (g *DAG) NodeFrom(node string) []Node

func (*DAG) Nodes added in v0.1.112

func (g *DAG) Nodes() []Node

func (*DAG) Parents added in v0.1.112

func (g *DAG) Parents(s string) []Node

func (*DAG) Print added in v0.1.112

func (g *DAG) Print() string

func (*DAG) PrintAsDot added in v0.1.112

func (g *DAG) PrintAsDot() string

func (*DAG) ReachableFrom added in v0.1.112

func (g *DAG) ReachableFrom(startNode string, endNode string) bool

ReachableFrom returns true if the endNode is reachable from the startNode

func (*DAG) SortedChildren added in v0.1.112

func (g *DAG) SortedChildren(startNode string) ([]Node, error)

func (*DAG) SortedParents added in v0.1.112

func (g *DAG) SortedParents(endNode string) ([]Node, error)

func (*DAG) SubGraphFrom added in v0.1.112

func (g *DAG) SubGraphFrom(startNode string) (*DAG, error)

SubGraphFrom returns a subgraph that contains all nodes that are reachable from the given node.

func (*DAG) SubGraphTo added in v0.1.112

func (g *DAG) SubGraphTo(endNode string) (*DAG, error)

func (*DAG) TopologicalSort added in v0.1.112

func (g *DAG) TopologicalSort() ([]Node, error)

func (*DAG) TopologicalSortFrom added in v0.1.112

func (g *DAG) TopologicalSortFrom(startNode string) ([]Node, error)

func (*DAG) TopologicalSortTo added in v0.1.112

func (g *DAG) TopologicalSortTo(endNode string) ([]Node, error)

func (*DAG) Verb added in v0.1.112

func (g *DAG) Verb() string

func (*DAG) WithRelationVerb added in v0.1.112

func (g *DAG) WithRelationVerb(verb string)

type Edge

type Edge struct {
	From string
	To   string
}

type Node added in v0.0.80

type Node struct {
	ID   string
	Type any
}

func (Node) String added in v0.0.81

func (n Node) String() string

type Service added in v0.1.112

type Service struct {
	Unique string
}

type ServiceDependencies added in v0.1.112

type ServiceDependencies struct {
	Workspace *resources.Workspace

	Graph *DAG
	// contains filtered or unexported fields
}

func NewServiceDependencies added in v0.1.112

func NewServiceDependencies(ctx context.Context, workspace *resources.Workspace) (*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

func (d *ServiceDependencies) DirectRequires(ctx context.Context, unique string) ([]Service, error)

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

func (d *ServiceDependencies) OrderTo(ctx context.Context, unique string) ([]Service, error)

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(ctx 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 ServiceDependency struct {
	From Service
	To   Service
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL