Documentation
¶
Index ¶
- func DOT(components []*policymonitoringv1.ComponentView, ...) string
- func FactoryModule() fx.Option
- func FactoryModuleForPolicyApp(circuitAPI runtime.CircuitAPI) fx.Option
- func Mermaid(components []*policymonitoringv1.ComponentView, ...) string
- func Module() fx.Option
- func NewComponentAndOptions(componentProto *policylangv1.Component, componentIndex int, ...) (runtime.ConfiguredComponent, []runtime.ConfiguredComponent, fx.Option, error)
- type Circuit
- type ComponentID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DOT ¶
func DOT(components []*policymonitoringv1.ComponentView, links []*policymonitoringv1.Link) string
DOT returns Components and Links as a DOT graph description.
func FactoryModule ¶
FactoryModule for component factory run via the main app.
func FactoryModuleForPolicyApp ¶
func FactoryModuleForPolicyApp(circuitAPI runtime.CircuitAPI) fx.Option
FactoryModuleForPolicyApp for component factory run via the policy app. For singletons in the Policy scope.
func Mermaid ¶
func Mermaid(components []*policymonitoringv1.ComponentView, links []*policymonitoringv1.Link) string
Mermaid returns Components and Links as a mermaid graph.
func NewComponentAndOptions ¶
func NewComponentAndOptions( componentProto *policylangv1.Component, componentIndex int, policyReadAPI iface.Policy, ) (runtime.ConfiguredComponent, []runtime.ConfiguredComponent, fx.Option, error)
NewComponentAndOptions creates component and its fx options.
Types ¶
type Circuit ¶
type Circuit struct {
// contains filtered or unexported fields
}
Circuit is a compiled Circuit
Circuit can also be converted to its graph view.
func CompileFromProto ¶
func CompileFromProto( circuitProto []*policylangv1.Component, policyReadAPI iface.Policy, ) (*Circuit, fx.Option, error)
CompileFromProto compiles a protobuf circuit definition into a Circuit.
This is helper for CreateComponents + runtime.Compile.
func (*Circuit) Components ¶
func (circuit *Circuit) Components() []runtime.CompiledComponent
Components returns a list of CompiledComponents, ready to create runtime.Circuit.
func (*Circuit) ToGraphView ¶
func (circuit *Circuit) ToGraphView() ([]*policymonitoringv1.ComponentView, []*policymonitoringv1.Link)
ToGraphView creates a graph representation of a Circuit.
type ComponentID ¶
type ComponentID string
ComponentID is a component identifier based on position in original proto list of components.
func CreateComponents ¶
func CreateComponents( circuitProto []*policylangv1.Component, policyReadAPI iface.Policy, ) ([]runtime.ConfiguredComponent, []ComponentID, fx.Option, error)
CreateComponents creates circuit components along with their identifiers and fx options.
Note that number of returned components might be greater than number of components in circuitProto, as some components may have their subcomponents.
func (ComponentID) ParentID ¶
func (id ComponentID) ParentID() ComponentID
ParentID returns ID of parent component.