testcomponents

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 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 `river:"input,attr"`
}

PassthroughConfig configures the testcomponents.passthrough component.

type PassthroughExports

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

PassthroughExports describes exported fields for the testcomponents.passthrough component.

type Singleton added in v0.28.0

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

Singleton implements the testcomponents.singleton component, which is a no-op component.

func NewSingleton added in v0.28.0

func NewSingleton(o component.Options, cfg SingletonArguments) (*Singleton, error)

NewSingleton creates a new singleton component.

func (*Singleton) Run added in v0.28.0

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

Run implements Component.

func (*Singleton) Update added in v0.28.0

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

Update implements Component.

type SingletonArguments added in v0.28.0

type SingletonArguments struct{}

SingletonArguments configures the testcomponents.singleton component.

type SingletonExports added in v0.28.0

type SingletonExports struct{}

SingletonExports describes exported fields for the testcomponents.singleton 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 `river:"frequency,attr"`
}

TickConfig configures the testcomponents.tick component.

type TickExports

type TickExports struct {
	Time time.Time `river:"tick_time,attr,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