jobs

package
v0.0.0-...-a4d1c61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CheckSimulationKind = &actions.Job{
	Execute: checkSimulationKind,
}

CheckSimulationKind is used to check that a certain simulation is of a specific kind. CheckSimulationKind can be used to check if a simulation is single, parent or child.

View Source
var CheckSimulationNoError = &actions.Job{
	Execute: checkSimulationNoError,
}

CheckSimulationNoError is in charge of checking that the simulation has no error status.

View Source
var CheckSimulationStatus = &actions.Job{
	Execute: checkSimulationStatus,
}

CheckSimulationStatus is used to check that a certain simulation has a specific status. It returns true if the simulation matches the given status.

View Source
var ConfigureIngress = &actions.Job{
	Execute: configureIngress,
}

ConfigureIngress is a generic job to be used to configure the ingress that will allow websocket connections.

View Source
var CreateConfigurations = &actions.Job{
	Name:       "create-configurations",
	Execute:    createConfigurations,
	InputType:  actions.GetJobDataType(&CreateConfigurationsInput{}),
	OutputType: actions.GetJobDataType(&CreateConfigurationsOutput{}),
}

CreateConfigurations is a generic job to create cluster configurations.

View Source
var CreateNetworkPolicies = &actions.Job{
	Execute: createNetworkPolicies,
}

CreateNetworkPolicies is a generic job to be used to create network policies.

View Source
var LaunchInstances = &actions.Job{
	Execute:         launchInstances,
	RollbackHandler: removeCreatedInstances,
}

LaunchInstances is a generic job to launch instances. It includes a rollback handler to terminate the instances that were created in this job.

View Source
var LaunchPods = &actions.Job{
	Execute: launchPods,
}

LaunchPods is a generic job to launch pods on a cluster.

View Source
var LaunchWebsocketService = &actions.Job{
	Execute: launchWebsocketService,
}

LaunchWebsocketService is generic to job to launch a simulation's websocket service.

View Source
var RemoveConfigurations = &actions.Job{
	Execute: removeConfigurations,
}

RemoveConfigurations is a generic job that removes configurations.

View Source
var RemoveIngressRules = &actions.Job{
	Execute: removeIngressRules,
}

RemoveIngressRules is a generic job used to remove ingress rules.

View Source
var RemoveInstances = &actions.Job{
	Execute: removeInstances,
}

RemoveInstances is a generic job to remove instances.

View Source
var RemoveNetworkPolicies = &actions.Job{
	Execute: removeNetworkPolicies,
}

RemoveNetworkPolicies is a generic job to be used to remove network policies.

View Source
var RemovePods = &actions.Job{
	Execute: removePods,
}

RemovePods is a generic job to remove pods from a cluster.

View Source
var RemoveWebsocketService = &actions.Job{
	Execute: removeWebsocketService,
}

RemoveWebsocketService is generic to job to remove simulation's websocket services.

View Source
var SetSimulationStatus = &actions.Job{
	Execute: setSimulationStatus,
}

SetSimulationStatus is used to set a certain status to a simulation.

View Source
var Wait = &actions.Job{
	Execute: wait,
}

Wait is a job that is in charge of waiting for a certain process to happen.

View Source
var WaitForInstances = &actions.Job{
	Name:    "wait-for-instances",
	Execute: waitForInstances,
}

WaitForInstances is used to wait until all required instances are ready.

Functions

func DeleteCreatedConfigurationsOnFailure

func DeleteCreatedConfigurationsOnFailure(store actions.Store, tx *gorm.DB, deployment *actions.Deployment,
	value interface{}, err error) (interface{}, error)

DeleteCreatedConfigurationsOnFailure is an optional rollback handler that removes any created configurations when an action fails.

Types

type CheckSimulationKindInput

type CheckSimulationKindInput struct {
	// The simulation that will be checked.
	Simulation simulations.Simulation
	// The kind that the simulation should match.
	Kind simulations.Kind
}

CheckSimulationKindInput is the input of the CheckSimulationKind job.

type CheckSimulationKindOutput

type CheckSimulationKindOutput bool

CheckSimulationKindOutput is the output of the CheckSimulationKind job. It will be true if the simulation is of the expected kind.

type CheckSimulationNoErrorInput

type CheckSimulationNoErrorInput []simulations.Simulation

CheckSimulationNoErrorInput is the input of the CheckSimulationNoError job.

type CheckSimulationNoErrorOutput

type CheckSimulationNoErrorOutput struct {
	Error error
}

CheckSimulationNoErrorOutput is the output of the CheckSimulationNoError job.

type CheckSimulationStatusInput

type CheckSimulationStatusInput struct {
	// Simulation is the simulation that will be checked.
	Simulation simulations.Simulation
	// Status is the status that the Simulation should match.
	Status simulations.Status
}

CheckSimulationStatusInput is the input of the CheckSimulationStatus job.

type CheckSimulationStatusOutput

type CheckSimulationStatusOutput bool

CheckSimulationStatusOutput is the output of the CheckSimulationStatus job.

type ConfigureIngressInput

type ConfigureIngressInput struct {
	Name      string
	Namespace string
	Host      string
	Paths     []ingresses.Path
}

ConfigureIngressInput is the input for the ConfigureIngress job.

type ConfigureIngressOutput

type ConfigureIngressOutput struct {
	// Error has a reference to an error if configuring the ingress fails.
	Error error
}

ConfigureIngressOutput is the output of the ConfigureIngress job.

type CreateConfigurationsInput

type CreateConfigurationsInput []configurations.CreateConfigurationInput

CreateConfigurationsInput is the input of the CreateConfigurations job.

type CreateConfigurationsOutput

type CreateConfigurationsOutput struct {
	Resources []resource.Resource
	Error     error
}

CreateConfigurationsOutput is the output of the CreateConfigurations job. This struct was set in place to let the post-hook handle errors.

type CreateNetworkPoliciesInput

type CreateNetworkPoliciesInput []network.CreateNetworkPolicyInput

CreateNetworkPoliciesInput is the input for the CreateNetworkPolicies job.

type CreateNetworkPoliciesOutput

type CreateNetworkPoliciesOutput struct {
	// Resource is the representation of the network policies that were created.
	Resource []resource.Resource

	// Error has a reference to the latest error thrown when creating the network policies.
	Error error
}

CreateNetworkPoliciesOutput is the output of the CreateNetworkPolicies job.

type LaunchInstancesInput

type LaunchInstancesInput []machines.CreateMachinesInput

LaunchInstancesInput is the input of the LaunchInstances job. It's used to pass the list of instances to create.

type LaunchInstancesOutput

type LaunchInstancesOutput []machines.CreateMachinesOutput

LaunchInstancesOutput is the output of the LaunchInstances job. It's used to pass the list of instances created.

type LaunchPodsInput

type LaunchPodsInput []pods.CreatePodInput

LaunchPodsInput is the input of the LaunchPods job.

type LaunchPodsOutput

type LaunchPodsOutput struct {
	Resources []resource.Resource
	Error     error
}

LaunchPodsOutput is the output of the LaunchPods job. This struct was set in place to let the post-hook handle errors.

type LaunchWebsocketServiceInput

type LaunchWebsocketServiceInput services.CreateServiceInput

LaunchWebsocketServiceInput is the input of the LaunchWebsocketService job.

type LaunchWebsocketServiceOutput

type LaunchWebsocketServiceOutput struct {
	Resource resource.Resource
	Error    error
}

LaunchWebsocketServiceOutput is the output of the LaunchWebsocketService job. This struct was set in place to let the post-hook handle errors.

type RemoveConfigurationsInput

type RemoveConfigurationsInput struct {
	Resource resource.Resource
}

RemoveConfigurationsInput is the input for the RemoveConfigurations job.

type RemoveConfigurationsOutput

type RemoveConfigurationsOutput struct {
	// Error has a reference to the latest error thrown when removing the configurations.
	Error error
}

RemoveConfigurationsOutput is the output of the RemoveConfigurations job.

type RemoveIngressRulesInput

type RemoveIngressRulesInput struct {
	Name      string
	Namespace string
	Host      string
	Paths     []ingresses.Path
}

RemoveIngressRulesInput is the input for the RemoveIngressRule job.

type RemoveIngressRulesOutput

type RemoveIngressRulesOutput struct {
	// Error has a reference to an error if removing ingress rules fails.
	Error error
}

RemoveIngressRulesOutput is the output of the ConfigureIngress job.

type RemoveInstancesInput

type RemoveInstancesInput []machines.TerminateMachinesInput

RemoveInstancesInput is the input of the RemoveInstances job. It's used to pass the list of instances to remove.

type RemoveNetworkPoliciesInput

type RemoveNetworkPoliciesInput struct {
	Selector  resource.Selector
	Namespace string
}

RemoveNetworkPoliciesInput is the input for the RemoveNetworkPolicies job.

type RemoveNetworkPoliciesOutput

type RemoveNetworkPoliciesOutput struct {
	// Error has a reference to the latest error thrown when removing the network policies.
	Error error
}

RemoveNetworkPoliciesOutput is the output of the RemoveNetworkPolicies job.

type RemovePodsInput

type RemovePodsInput []resource.Resource

RemovePodsInput is the input of the RemovePods job.

type RemovePodsOutput

type RemovePodsOutput struct {
	Resources []resource.Resource
	Error     error
}

RemovePodsOutput is the output of the RemovePods job. This struct was set in place to let the post-hook handle errors.

type RemoveWebsocketServiceInput

type RemoveWebsocketServiceInput struct {
	Name      string
	Namespace string
}

RemoveWebsocketServiceInput is the input of the RemoveWebsocketService job.

type RemoveWebsocketServiceOutput

type RemoveWebsocketServiceOutput struct {
	Error error
}

RemoveWebsocketServiceOutput is the output of the RemoveWebsocketService job. This struct was set in place to let the post-hook handle errors.

type SetSimulationStatusInput

type SetSimulationStatusInput struct {
	// GroupID identifies the simulation that should change the status.
	GroupID simulations.GroupID
	// Status is the status that will be assigned to a certain simulation.
	Status simulations.Status
}

SetSimulationStatusInput is the input for SetSimulationStatus job.

type SetSimulationStatusOutput

type SetSimulationStatusOutput struct {
	// GroupID identifies the simulation that has changed its status.
	GroupID simulations.GroupID
	// Status is the status that has been applied to the simulation identified by the GroupID.
	Status simulations.Status
}

SetSimulationStatusOutput is the output of the SetSimulationStatus job.

type WaitForInstancesInput

type WaitForInstancesInput []machines.CreateMachinesOutput

WaitForInstancesInput is the input of the WaitForInstances job.

type WaitForInstancesOutput

type WaitForInstancesOutput []machines.CreateMachinesOutput

WaitForInstancesOutput is the output of the WaitForInstances job.

type WaitInput

type WaitInput struct {
	Request       waiter.Waiter
	PollFrequency time.Duration
	Timeout       time.Duration
}

WaitInput is the input of the Wait job.

type WaitOutput

type WaitOutput struct {
	Error error
}

WaitOutput is the output of the Wait job.

Jump to

Keyboard shortcuts

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