processor

package
v0.0.0-...-ded851d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package processor does the work of taking incoming events from machines and updating the machine state using that information. The goal is to move all the logic out of `skia_mobile.py` and into processor.

TODO(jcgregorio) Add support for devices beyond Android. TODO(kjlubick,jcgregorio) Use ro.build.fingerprint to catch cases where the phone manufacturuers push and update but don't rev the android version.

Package processor does the work of taking incoming events from machines and updating the machine state using that information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor interface {
	Process(ctx context.Context, current machine.Description, event machine.Event) machine.Description
}

Processor does the work of taking an incoming event and updating the Machine State based on that event.

type ProcessorFunc

type ProcessorFunc func(ctx context.Context, current machine.Description, event machine.Event) machine.Description

ProcessorFunc is a utility type that allows using a function as a Processor.

func (ProcessorFunc) Process

Process implements the Processor interface.

type ProcessorImpl

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

ProcessorImpl implements the Processor interface.

func New

func New(ctx context.Context) *ProcessorImpl

New returns a new Processor instance.

func (*ProcessorImpl) Process

func (p *ProcessorImpl) Process(ctx context.Context, previous machine.Description, event machine.Event) machine.Description

Process implements the Processor interface.

Jump to

Keyboard shortcuts

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