Path: blob/main/pkg/flow/internal/controller/block_node.go
4095 views
package controller12import (3"github.com/grafana/agent/pkg/flow/internal/dag"4"github.com/grafana/agent/pkg/river/ast"5"github.com/grafana/agent/pkg/river/vm"6)78// BlockNode is a node in the DAG which manages a River block9// and can be evaluated.10type BlockNode interface {11dag.Node1213// Block returns the current block of the managed config node.14Block() *ast.BlockStmt1516// Evaluate updates the arguments for the managed component17// by re-evaluating its River block with the provided scope. The managed component18// will be built the first time Evaluate is called.19//20// Evaluate will return an error if the River block cannot be evaluated or if21// decoding to arguments fails.22Evaluate(scope *vm.Scope) error23}242526