api

package
v0.0.0-...-7b48451 Latest Latest
Warning

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

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

Documentation

Overview

Package api defines RPC messages used to communicate with the runner module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel  *slog.Level `json:"log_level,omitempty"`
	AddSource *bool       `json:"log_add_source,omitempty"`
	Options   struct {
		DynamicLocation *bool             `json:"dynamic_location,omitempty"`
		Strategy        string            `json:"strategy,omitempty"`
		Polling         *rpc.Duration     `json:"polling,omitempty"`
		Heartbeat       *rpc.Duration     `json:"heartbeat,omitempty"`
		Rules           map[string]string `json:"rules,omitempty"`
	} `json:"options,omitempty"`
}

Config defines configuration options.

type Details

type Details struct {
	WindowID   int       `json:"wid"`
	ProcessID  int       `json:"pid"`
	Name       string    `json:"name"`
	Class      string    `json:"class"`
	WindowName string    `json:"window"`
	LastInput  time.Time `json:"last_input"`
	Locked     bool      `json:"locked"`
}

Details is the set of variable provided to rules. Each field is provided to the CEL environment as a global and the previous evaluation's values are available as fields of the global, last.

type Notification

type Notification struct {
	UID    rpc.UID        `json:"uid"` // If UID is set, the notify is forwarded.
	Method string         `json:"method"`
	Params map[string]any `json:"params,omitempty"`
}

Notification is the RPC parameter for a change call.

Jump to

Keyboard shortcuts

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