Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLazyNode ¶ added in v0.3.0
func NewLazyNode(node OpNode, controller *Controller) (OpNode, *Controller)
NewLazyNode creates a new wrapper around a function fNode to make it support lazy initialization
Types ¶
type BlockCache ¶ added in v0.3.0
type BlockCache struct {
// contains filtered or unexported fields
}
BlockCache is used to cache blocks
func NewBlockCache ¶ added in v0.3.0
func NewBlockCache() *BlockCache
NewBlockCache creates a new BlockCache
func (*BlockCache) Add ¶ added in v0.3.0
Add the block to the cache, errors out if block already exists
func (*BlockCache) Get ¶ added in v0.3.0
Get the block from the cache TODO: Evaluate only a single process getting a block at a time
func (*BlockCache) Remove ¶ added in v0.3.0
func (c *BlockCache) Remove(key parser.NodeID)
Remove the block from the cache
type Controller ¶
Controller controls the caching and forwarding the request to downstream.
func (*Controller) AddTransform ¶
func (t *Controller) AddTransform(node OpNode)
AddTransform adds a dependent transformation to the controller
func (*Controller) BlockBuilder ¶
func (t *Controller) BlockBuilder(blockMeta block.Metadata, seriesMeta []block.SeriesMeta) (block.Builder, error)
BlockBuilder returns a BlockBuilder instance with associated metadata
type MetaNode ¶ added in v0.3.0
type MetaNode interface {
// Meta provides the block metadata for the block using the input blocks' metadata as input
Meta(meta block.Metadata) block.Metadata
// SeriesMeta provides the series metadata for the block using the previous blocks' series metadata as input
SeriesMeta(metas []block.SeriesMeta) []block.SeriesMeta
}
MetaNode is implemented by function nodes which can alter metadata for a block
type Params ¶ added in v0.3.0
type Params interface {
parser.Params
Node(controller *Controller) OpNode
}
Params are defined by transforms
type SeriesNode ¶ added in v0.3.0
SeriesNode is implemented by function nodes which can support series iteration