mock

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package mock contains mock implementations of the query package interfaces for testing.

Index

Constants

This section is empty.

Variables

View Source
var NoMetadata <-chan flux.Metadata

Functions

This section is empty.

Types

type AscendingTimeProvider added in v0.21.0

type AscendingTimeProvider struct {
	Start int64
}

AscendingTimeProvider provides ascending timestamps every nanosecond starting from Start.

func (*AscendingTimeProvider) CurrentTime added in v0.21.0

func (atp *AscendingTimeProvider) CurrentTime() values.Time

type Compiler

type Compiler struct {
	CompileFn func(ctx context.Context) (*flux.Spec, error)
	Type      flux.CompilerType
}

func (Compiler) Compile

func (c Compiler) Compile(ctx context.Context) (*flux.Spec, error)

func (Compiler) CompilerType

func (c Compiler) CompilerType() flux.CompilerType

type Executor

type Executor struct {
	ExecuteFn func(ctx context.Context, p *plan.PlanSpec, a *memory.Allocator) (map[string]flux.Result, <-chan flux.Metadata, error)
}

Executor is a mock implementation of an execute.Executor.

func NewExecutor

func NewExecutor() *Executor

NewExecutor returns a mock Executor where its methods will return zero values.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, p *plan.PlanSpec, a *memory.Allocator) (map[string]flux.Result, <-chan flux.Metadata, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL