controller

package
v0.32.54 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Canceled        sleepResult = true
	DurationReached sleepResult = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandFunc

type CommandFunc func(context.Context, *api.Command) error

type Config

type Config struct {
	Enabled bool           `json:"enabled"`
	Server  *client.Config `json:"server"`
}

type Controller

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

func NewController

func NewController(logger *zerolog.Logger, policyName, host string, cfg *Config, handler CommandFunc) (*Controller, error)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context) func()

run context dependant controller.

Jump to

Keyboard shortcuts

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