extworkload

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkloadTargetId = "com.steadybit.extension_newrelic.workload"

	WorkloadCheckActionId = "com.steadybit.extension_newrelic.workload_check"
)

Variables

This section is empty.

Functions

func NewWorkloadCheckAction

func NewWorkloadCheckAction() action_kit_sdk.Action[WorkloadCheckState]

func NewWorkloadDiscovery

func NewWorkloadDiscovery() discovery_kit_sdk.TargetDiscovery

func WorkloadCheckStatus

func WorkloadCheckStatus(ctx context.Context, state *WorkloadCheckState, api WorkloadStatusApi) (*action_kit_api.StatusResult, error)

Types

type GetWorkloadsApi

type GetWorkloadsApi interface {
	GetAccountIds(ctx context.Context) ([]int64, error)
	GetWorkloads(ctx context.Context, accountId int64) ([]types.Workload, error)
}

type WorkloadCheckAction

type WorkloadCheckAction struct{}

func (*WorkloadCheckAction) Describe

func (m *WorkloadCheckAction) Describe() action_kit_api.ActionDescription

func (*WorkloadCheckAction) NewEmptyState

func (m *WorkloadCheckAction) NewEmptyState() WorkloadCheckState

func (*WorkloadCheckAction) Prepare

func (m *WorkloadCheckAction) Prepare(_ context.Context, state *WorkloadCheckState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error)

func (*WorkloadCheckAction) Start

func (m *WorkloadCheckAction) Start(ctx context.Context, state *WorkloadCheckState) (*action_kit_api.StartResult, error)

func (*WorkloadCheckAction) Status

func (m *WorkloadCheckAction) Status(ctx context.Context, state *WorkloadCheckState) (*action_kit_api.StatusResult, error)

type WorkloadCheckState

type WorkloadCheckState struct {
	Start              time.Time
	End                time.Time
	Target             action_kit_api.Target
	ExpectedStates     []string
	ConditionCheckMode string
	ObservedStates     map[string]bool
}

type WorkloadStatusApi

type WorkloadStatusApi interface {
	GetWorkloadStatus(ctx context.Context, workloadGuid string, accountId int64) (*string, error)
}

Jump to

Keyboard shortcuts

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