{"modulePath":"github.com/m3db/m3","version":"v1.6.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package transform\n\nPackage transform is a generated GoMock package.\n\nPackage transform is a generated GoMock package.\n\n## Functions\n\n```go\nfunc ProcessSimpleBlock(\n\tnode simpleOpNode,\n\tcontroller *Controller,\n\tqueryCtx *models.QueryContext,\n\tID parser.NodeID,\n\tb block.Block,\n) error\n```\nProcessSimpleBlock is a utility for OpNode instances which on receiving a block, process and propagate it immediately (as opposed to nodes which e.g. depend on multiple blocks). It adds instrumentation to the processing, and handles propagating the block downstream. OpNode's should call this as their implementation of the Process method:\n\n\tfunc (n MyNode) Process(queryCtx *models.QueryContext, ID parser.NodeID, b block.Block) error {\n\t    return transform.ProcessSimpleBlock(n, n.controller, queryCtx, ID, b)\n\t}\n\n## Types\n\n```go\ntype BlockCache struct {\n\t// contains filtered or unexported fields\n}\n```\nBlockCache is used to cache blocks\n\n```go\nfunc NewBlockCache() *BlockCache\n```\nNewBlockCache creates a new BlockCache\n\n```go\nfunc (c *BlockCache) Add(key parser.NodeID, b block.Block) error\n```\nAdd the block to the cache, errors out if block already exists\n\n```go\nfunc (c *BlockCache) Get(key parser.NodeID) (block.Block, bool)\n```\nGet the block from the cache TODO: Evaluate only a single process getting a block at a time\n\n```go\nfunc (c *BlockCache) Remove(key parser.NodeID)\n```\nRemove the block from the cache\n\n```go\ntype BoundOp interface {\n\tBounds() BoundSpec\n}\n```\nBoundOp is an operation that is able to yield boundary information.\n\n```go\ntype BoundSpec struct {\n\t// Range is the time range for the operation.\n\tRange time.Duration\n\t// Offset is the offset for the operation.\n\tOffset time.Duration\n}\n```\nBoundSpec is the boundary specification for an operation.\n\n```go\ntype Controller struct {\n\tID parser.NodeID\n\t// contains filtered or unexported fields\n}\n```\nController controls the caching and forwarding the request to downstream.\n\n```go\nfunc (t *Controller) AddTransform(node OpNode)\n```\nAddTransform adds a dependent transformation to the controller.\n\n```go\nfunc (t *Controller) BlockBuilder(\n\tqueryCtx *models.QueryContext,\n\tblockMeta block.Metadata,\n\tseriesMeta []block.SeriesMeta) (block.Builder, error)\n```\nBlockBuilder returns a BlockBuilder instance with associated metadata\n\n```go\nfunc (t *Controller) HasMultipleOperations() bool\n```\nHasMultipleOperations returns true if there are multiple operations.\n\n```go\nfunc (t *Controller) Process(queryCtx *models.QueryContext, block block.Block) error\n```\nProcess performs processing on the underlying transforms\n\n```go\ntype MetaNode interface {\n\t// Meta provides the block metadata for the block using the\n\t// input blocks' metadata as input.\n\tMeta(meta block.Metadata) block.Metadata\n\t// SeriesMeta provides the series metadata for the block using the\n\t// previous blocks' series metadata as input.\n\tSeriesMeta(metas []block.SeriesMeta) []block.SeriesMeta\n}\n```\nMetaNode is implemented by function nodes which can alter metadata for a block.\n\n```go\ntype MockOpNode struct {\n\t// contains filtered or unexported fields\n}\n```\nMockOpNode is a mock of OpNode interface.\n\n```go\nfunc NewMockOpNode(ctrl *gomock.Controller) *MockOpNode\n```\nNewMockOpNode creates a new mock instance.\n\n```go\nfunc (m *MockOpNode) EXPECT() *MockOpNodeMockRecorder\n```\nEXPECT returns an object that allows the caller to indicate expected use.\n\n```go\nfunc (m *MockOpNode) Process(arg0 *models.QueryContext, arg1 parser.NodeID, arg2 block.Block) error\n```\nProcess mocks base method.\n\n```go\ntype MockOpNodeMockRecorder struct {\n\t// contains filtered or unexported fields\n}\n```\nMockOpNodeMockRecorder is the mock recorder for MockOpNode.\n\n```go\nfunc (mr *MockOpNodeMockRecorder) Process(arg0, arg1, arg2 interface{}) *gomock.Call\n```\nProcess indicates an expected call of Process.\n\n```go\ntype MocksimpleOpNode struct {\n\t// contains filtered or unexported fields\n}\n```\nMocksimpleOpNode is a mock of simpleOpNode interface.\n\n```go\nfunc NewMocksimpleOpNode(ctrl *gomock.Controller) *MocksimpleOpNode\n```\nNewMocksimpleOpNode creates a new mock instance.\n\n```go\nfunc (m *MocksimpleOpNode) EXPECT() *MocksimpleOpNodeMockRecorder\n```\nEXPECT returns an object that allows the caller to indicate expected use.\n\n```go\nfunc (m *MocksimpleOpNode) Params() parser.Params\n```\nParams mocks base method.\n\n```go\nfunc (m *MocksimpleOpNode) ProcessBlock(queryCtx *models.QueryContext, ID parser.NodeID, b block.Block) (block.Block, error)\n```\nProcessBlock mocks base method.\n\n```go\ntype MocksimpleOpNodeMockRecorder struct {\n\t// contains filtered or unexported fields\n}\n```\nMocksimpleOpNodeMockRecorder is the mock recorder for MocksimpleOpNode.\n\n```go\nfunc (mr *MocksimpleOpNodeMockRecorder) Params() *gomock.Call\n```\nParams indicates an expected call of Params.\n\n```go\nfunc (mr *MocksimpleOpNodeMockRecorder) ProcessBlock(queryCtx, ID, b interface{}) *gomock.Call\n```\nProcessBlock indicates an expected call of ProcessBlock.\n\n```go\ntype OpNode interface {\n\tProcess(\n\t\tqueryCtx *models.QueryContext,\n\t\tID parser.NodeID,\n\t\tblock block.Block,\n\t) error\n}\n```\nOpNode represents an execution node.\n\n```go\ntype Options struct {\n\t// contains filtered or unexported fields\n}\n```\nOptions to create transform nodes.\n\n```go\nfunc NewOptions(p OptionsParams) (Options, error)\n```\nNewOptions enforces that fields are set when options is created.\n\n```go\nfunc (o Options) BlockType() models.FetchedBlockType\n```\nBlockType returns the BlockType option.\n\n```go\nfunc (o Options) Debug() bool\n```\nDebug returns the Debug option.\n\n```go\nfunc (o Options) FetchOptions() *storage.FetchOptions\n```\nFetchOptions returns the FetchOptions option.\n\n```go\nfunc (o Options) InstrumentOptions() instrument.Options\n```\nInstrumentOptions returns the InstrumentOptions option.\n\n```go\nfunc (o Options) TimeSpec() TimeSpec\n```\nTimeSpec returns the TimeSpec option.\n\n```go\ntype OptionsParams struct {\n\tFetchOptions      *storage.FetchOptions\n\tTimeSpec          TimeSpec\n\tDebug             bool\n\tBlockType         models.FetchedBlockType\n\tInstrumentOptions instrument.Options\n}\n```\nOptionsParams are the parameters used to create Options.\n\n```go\ntype Params interface {\n\tparser.Params\n\tNode(controller *Controller, opts Options) OpNode\n}\n```\nParams are defined by transforms.\n\n```go\ntype TimeSpec struct {\n\t// Start is the inclusive start bound for the query.\n\tStart xtime.UnixNano\n\t// End is the exclusive end bound for the query.\n\tEnd xtime.UnixNano\n\t// Now captures the current time and fixes it throughout the request.\n\tNow time.Time\n\t// Step is the step size for the query.\n\tStep time.Duration\n}\n```\nTimeSpec defines the time bounds for the query execution. Start is inclusive and End is exclusive.\n\n```go\nfunc (ts TimeSpec) Bounds() models.Bounds\n```\nBounds transforms the timespec to bounds.\n\n","path":"github.com/m3db/m3/src/query/executor/transform","name":"transform","synopsis":"Package transform is a generated GoMock package.","isRedistributable":true}
