fake

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fake implements a fake encoder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEncoder added in v0.2.36

func NewEncoder(
	ctx context.Context,
	cfg resource.Config,
	logger logging.Logger,
) (encoder.Encoder, error)

NewEncoder creates a new Encoder.

Types

type Config added in v0.2.36

type Config struct {
	UpdateRate int64 `json:"update_rate_msec,omitempty"`
}

Config describes the configuration of a fake encoder.

func (*Config) Validate added in v0.2.36

func (cfg *Config) Validate(path string) ([]string, error)

Validate ensures all parts of a config is valid.

type Encoder

type Encoder interface {
	encoder.Encoder
	SetSpeed(ctx context.Context, speed float64) error
	SetPosition(ctx context.Context, position float64) error
}

Encoder is a fake encoder used for testing.

Jump to

Keyboard shortcuts

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