executor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertManagerCommander

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

func (*AlertManagerCommander) GetCommandType

func (c *AlertManagerCommander) GetCommandType() CommandType

func (*AlertManagerCommander) ParseCommand

func (c *AlertManagerCommander) ParseCommand(command *service.StepCommand) error

func (*AlertManagerCommander) Run

func (c *AlertManagerCommander) Run() (string, error)

type CommandType

type CommandType int
const (
	CommandTypeK8s CommandType = iota + 1
	CommandTypeP8s
	CommandTypeHelm
	CommandTypeJq
	CommandTypeAlertManager
	CommandTypeSynapseagent
	CommandTypeGrafana
	CommandTypeOpenstack
)

func (CommandType) String

func (ct CommandType) String() string

type Commander

type Commander interface {
	GetCommandType() CommandType
	Run() (string, error)
}

func NewAlertManagerCommander

func NewAlertManagerCommander(command *service.StepCommand) (Commander, error)

func NewCommander

func NewCommander(command *service.StepCommand) (Commander, error)

func NewGrafanaCommander

func NewGrafanaCommander(command *service.StepCommand) (Commander, error)

func NewHelmCommander

func NewHelmCommander(command *service.StepCommand) (Commander, error)

func NewJqCommander

func NewJqCommander(command *service.StepCommand) (Commander, error)

func NewK8sCommander

func NewK8sCommander(command *service.StepCommand) (Commander, error)

func NewOpenstackCommander

func NewOpenstackCommander(command *service.StepCommand) (Commander, error)

func NewP8sCommander

func NewP8sCommander(command *service.StepCommand) (Commander, error)

func NewSynapseagentCommander

func NewSynapseagentCommander(command *service.StepCommand) (Commander, error)

type GrafanaCommander

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

func (*GrafanaCommander) GetCommandType

func (c *GrafanaCommander) GetCommandType() CommandType

func (*GrafanaCommander) ParseCommand

func (c *GrafanaCommander) ParseCommand(command *service.StepCommand) error

func (*GrafanaCommander) Run

func (c *GrafanaCommander) Run() (string, error)

type HelmCommander

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

func (*HelmCommander) GetCommandType

func (c *HelmCommander) GetCommandType() CommandType

func (*HelmCommander) ParseCommand

func (c *HelmCommander) ParseCommand(command *service.StepCommand) error

func (*HelmCommander) Run

func (c *HelmCommander) Run() (string, error)

type JqCommander

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

func (*JqCommander) GetCommandType

func (c *JqCommander) GetCommandType() CommandType

func (*JqCommander) ParseCommand

func (c *JqCommander) ParseCommand(command *service.StepCommand) error

func (*JqCommander) Run

func (c *JqCommander) Run() (string, error)

type K8sCommander

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

func (*K8sCommander) GetCommandType

func (c *K8sCommander) GetCommandType() CommandType

func (*K8sCommander) ParseCommand

func (c *K8sCommander) ParseCommand(command *service.StepCommand) error

func (*K8sCommander) Run

func (c *K8sCommander) Run() (string, error)

type OpenstackCommander

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

func (*OpenstackCommander) GetCommandType

func (c *OpenstackCommander) GetCommandType() CommandType

func (*OpenstackCommander) ParseCommand

func (c *OpenstackCommander) ParseCommand(command *service.StepCommand) error

func (*OpenstackCommander) Run

func (c *OpenstackCommander) Run() (string, error)

type P8sCommander

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

func (*P8sCommander) GetCommandType

func (c *P8sCommander) GetCommandType() CommandType

func (*P8sCommander) ParseCommand

func (c *P8sCommander) ParseCommand(command *service.StepCommand) error

func (*P8sCommander) Run

func (c *P8sCommander) Run() (string, error)

type ServiceExecutor

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

func NewServiceExecutor

func NewServiceExecutor(service service.ServiceV1, updateChannel chan<- service.ServiceUpdateInterface) *ServiceExecutor

func (*ServiceExecutor) Execute

func (se *ServiceExecutor) Execute() (err error)

func (*ServiceExecutor) SendServiceStatusUpdate

func (se *ServiceExecutor) SendServiceStatusUpdate(seq int, status service.StepStatus, result string, st, et time.Time)

type ServiceExecutorV2

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

func NewServiceExecutorV2

func NewServiceExecutorV2(service service.ServiceV2, updateChannel chan<- service.ServiceUpdateInterface) *ServiceExecutorV2

func (*ServiceExecutorV2) Execute

func (se *ServiceExecutorV2) Execute() (err error)

func (*ServiceExecutorV2) SendServiceStatusUpdate

func (se *ServiceExecutorV2) SendServiceStatusUpdate(seq int, status service.StepStatus, result string, st, et time.Time)

type StepExecutor

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

func NewStepExecutor

func NewStepExecutor(step service.Step) (*StepExecutor, error)

func (*StepExecutor) Execute

func (se *StepExecutor) Execute() service.Result

type StepExecutorV2

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

func NewStepExecutorV2

func NewStepExecutorV2(step *service.FlowStep) (*StepExecutorV2, error)

func (*StepExecutorV2) Execute

func (se *StepExecutorV2) Execute() service.Result

type SynapseagentCommander

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

func (*SynapseagentCommander) GetCommandType

func (c *SynapseagentCommander) GetCommandType() CommandType

func (*SynapseagentCommander) ParseCommand

func (c *SynapseagentCommander) ParseCommand(command *service.StepCommand) error

func (*SynapseagentCommander) Run

func (c *SynapseagentCommander) Run() (string, error)

Jump to

Keyboard shortcuts

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