testcomponents

package
v0.25.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package testcomponents contains components useful for testing. They are not intended to be exposed by end users and so this package should only be imported in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Passthrough

type Passthrough struct {
	// contains filtered or unexported fields
}

Passthrough implements the testcomponents.passthrough component, where it always emits its input as an output.

func NewPassthrough

func NewPassthrough(o component.Options, cfg PassthroughConfig) (*Passthrough, error)

NewPassthrough creates a new passthrough component.

func (*Passthrough) DebugInfo

func (t *Passthrough) DebugInfo() interface{}

DebugInfo implements DebugComponent.

func (*Passthrough) Run

func (t *Passthrough) Run(ctx context.Context) error

Run implements Component.

func (*Passthrough) Update

func (t *Passthrough) Update(args component.Arguments) error

Update implements Component.

type PassthroughConfig

type PassthroughConfig struct {
	Input string `hcl:"input,attr"`
}

PassthroughConfig configures the testcomponents.passthrough component.

type PassthroughExports

type PassthroughExports struct {
	Output string `hcl:"output,optional"`
}

PassthroughExports describes exported fields for the testcomponents.passthrough component.

type Tick

type Tick struct {
	// contains filtered or unexported fields
}

Tick implements the testcomponents.tick component, where the wallclock time will be emitted on a given frequency.

func NewTick

func NewTick(o component.Options, cfg TickConfig) (*Tick, error)

NewTick creates a new testcomponents.tick component.

func (*Tick) Run

func (t *Tick) Run(ctx context.Context) error

Run implements Component.

func (*Tick) Update

func (t *Tick) Update(args component.Arguments) error

Update implements Component.

type TickConfig

type TickConfig struct {
	Frequency time.Duration `hcl:"frequency,attr"`
}

TickConfig configures the testcomponents.tick component.

type TickExports

type TickExports struct {
	Time time.Time `hcl:"tick_time,optional"`
}

TickExports describes exported fields for the testcomponents.tick component.

Jump to

Keyboard shortcuts

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