package
Version:
v0.68.1
Opens a new window with list of versions in this module.
Published: Mar 25, 2025
License: AGPL-3.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package fake implements a fake encoder.
func NewEncoder(
ctx context.Context,
cfg resource.Config,
logger logging.Logger,
) (encoder.Encoder, error)
NewEncoder creates a new Encoder.
type Config struct {
UpdateRate int64 `json:"update_rate_msec,omitempty"`
}
Config describes the configuration of a fake encoder.
func (cfg *Config) Validate(path string) ([]string, error)
Validate ensures all parts of a config is valid.
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.