Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exports ¶
type Exports struct { // Exports exported from the running module. Exports map[string]any `river:"exports,block"` }
Exports holds values which are exported from the run module.
type ModuleComponent ¶
type ModuleComponent struct {
// contains filtered or unexported fields
}
ModuleComponent holds the common properties for module components.
func NewModuleComponent ¶
func NewModuleComponent(o component.Options) (*ModuleComponent, error)
NewModuleComponent initializes a new ModuleComponent.
func (*ModuleComponent) CurrentHealth ¶
func (c *ModuleComponent) CurrentHealth() component.Health
CurrentHealth contains the implementation details for CurrentHealth in a module component.
func (*ModuleComponent) LoadFlowSource ¶ added in v0.37.0
func (c *ModuleComponent) LoadFlowSource(args map[string]any, contentValue string) error
LoadFlowSource loads the flow controller with the current component source. It will set the component health in addition to return the error so that the consumer can rely on either or both. If the content is the same as the last time it was successfully loaded, it will not be reloaded.
func (*ModuleComponent) RunFlowController ¶
func (c *ModuleComponent) RunFlowController(ctx context.Context)
RunFlowController runs the flow controller that all module components start.