actionmanager

package
v0.0.0-...-cef8734 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionManager

type ActionManager interface {
	// ExecutePostShell is used to execute post shell in config item
	ExecutePostShell(ctx context.Context, config configs.ConfigItem) error
	// ExecutePostAction is used to execute post action in config item
	ExecutePostAction(ctx context.Context, config configs.ConfigItem) error
}

ActionManager is used to manage actions

func NewActionManager

func NewActionManager(log logger.Logger) (ActionManager, error)

NewActionManager is used to create action manager

type BasicActionManager

type BasicActionManager struct {
	logger.Logger
	// contains filtered or unexported fields
}

BasicActionManager is a basic implement of ActionManager

func NewBasicActionManager

func NewBasicActionManager(log logger.Logger) (*BasicActionManager, error)

NewBasicActionManager is used to create a BasicActionManager

func (*BasicActionManager) ExecutePostAction

func (m *BasicActionManager) ExecutePostAction(ctx context.Context, config configs.ConfigItem) error

ExecutePostAction is used to execute post action in config item

func (*BasicActionManager) ExecutePostShell

func (m *BasicActionManager) ExecutePostShell(ctx context.Context, config configs.ConfigItem) error

ExecutePostShell is used to execute post shell in config item

type ErrPostAction

type ErrPostAction struct {
	Path      string
	Name      string
	Arguments []string
	Err       error
}

ErrPostAction defines the post action error

func (*ErrPostAction) Error

func (err *ErrPostAction) Error() string

Error implements the standard error interface

type ErrPostShell

type ErrPostShell struct {
	Path string
	*command.ErrCommandExec
}

ErrPostShell defines the post shell command error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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