patterns

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const AllKeysLabel = "all-keys"
View Source
const DefaultIdlePeriod = 30 * time.Second
View Source
const DelayLabel = "delay"
View Source
const IdleLabel = "idle"
View Source
const IdlePeriodLabel = "idle-period"
View Source
const InputEventIDLabel = "input-event-id"

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePattern

type BasePattern struct {
	Name string
	// contains filtered or unexported fields
}

func (*BasePattern) GetBase

func (p *BasePattern) GetBase() *BasePattern

func (*BasePattern) GetDefaultDelay

func (p *BasePattern) GetDefaultDelay() time.Duration

func (*BasePattern) Run

func (p *BasePattern) Run(parent context.Context, log *zerolog.Logger) error

func (*BasePattern) Stop

func (p *BasePattern) Stop()

func (*BasePattern) String

func (p *BasePattern) String() string

type CPUPattern

type CPUPattern struct {
	BasePattern
}

type DesktopPattern

type DesktopPattern struct {
	BasePattern
	// contains filtered or unexported fields
}

type Pattern

type Pattern interface {
	GetDefaultDelay() time.Duration
	GetBase() *BasePattern
	Run(context.Context, *zerolog.Logger) error
	Stop()
	String() string
}

func Get

func Get(name string) Pattern

func GetRunning

func GetRunning() Pattern

type PulsePattern

type PulsePattern struct {
	BasePattern
}

type RainbowPattern

type RainbowPattern struct {
	BasePattern
}

type RandomPattern

type RandomPattern struct {
	BasePattern
}

type TypingPattern

type TypingPattern struct {
	BasePattern
}

func (*TypingPattern) String

func (p *TypingPattern) String() string

type WaitPattern

type WaitPattern struct {
	BasePattern
}

func (*WaitPattern) Run

func (p *WaitPattern) Run(parent context.Context, _ *zerolog.Logger) error

SPECIAL CASE!! This _overrides_ BasePattern.Run() and will hang forever,

waiting for the parent context to interrupt.

Jump to

Keyboard shortcuts

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