environments

package
v1.116.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnvironmentController

func NewEnvironmentController(environmentHandlerFactory EnvironmentHandlerFactory) models.Controller

NewEnvironmentController Constructor

Types

type EnvironmentHandler

type EnvironmentHandler struct {
	ComponentStatuser deploymentModels.ComponentStatuserFunc
	// contains filtered or unexported fields
}

EnvironmentHandler Instance variables

func Init

Init Constructor. Use the WithAccounts configuration function to configure a 'ready to use' EnvironmentHandler. EnvironmentHandlerOptions are processed in the sequence they are passed to this function.

func (EnvironmentHandler) CopyBatch

func (eh EnvironmentHandler) CopyBatch(ctx context.Context, appName, envName, jobComponentName, batchName string, scheduledBatchRequest environmentModels.ScheduledBatchRequest) (*deploymentModels.ScheduledBatchSummary, error)

CopyBatch Copy batch by name

func (EnvironmentHandler) CopyJob

func (eh EnvironmentHandler) CopyJob(ctx context.Context, appName, envName, jobComponentName, jobName string, scheduledJobRequest environmentModels.ScheduledJobRequest) (*deploymentModels.ScheduledJobSummary, error)

CopyJob Copy job by name

func (EnvironmentHandler) CreateEnvironment

func (eh EnvironmentHandler) CreateEnvironment(ctx context.Context, appName, envName string) (*radixv1.RadixEnvironment, error)

CreateEnvironment Handler for CreateEnvironment. Creates an environment if it does not exist

func (EnvironmentHandler) DeleteBatch

func (eh EnvironmentHandler) DeleteBatch(ctx context.Context, appName, envName, jobComponentName, batchName string) error

DeleteBatch Delete batch by name

func (EnvironmentHandler) DeleteEnvironment

func (eh EnvironmentHandler) DeleteEnvironment(ctx context.Context, appName, envName string) error

DeleteEnvironment Handler for DeleteEnvironment. Deletes an environment if it is considered orphaned

func (EnvironmentHandler) DeleteJob

func (eh EnvironmentHandler) DeleteJob(ctx context.Context, appName, envName, jobComponentName, jobName string) error

DeleteJob Delete a job by name

func (EnvironmentHandler) GetAuxiliaryResourcePodLog

func (eh EnvironmentHandler) GetAuxiliaryResourcePodLog(ctx context.Context, appName, envName, componentName, auxType, podName string, sinceTime *time.Time, logLines *int64, follow bool) (io.ReadCloser, error)

GetAuxiliaryResourcePodLog handler for GetAuxiliaryResourcePodLog

func (EnvironmentHandler) GetBatch

func (eh EnvironmentHandler) GetBatch(ctx context.Context, appName, envName, jobComponentName, batchName string) (*deploymentModels.ScheduledBatchSummary, error)

GetBatch Gets batch by name

func (EnvironmentHandler) GetBatches

func (eh EnvironmentHandler) GetBatches(ctx context.Context, appName, envName, jobComponentName string) ([]deploymentModels.ScheduledBatchSummary, error)

GetBatches Get batches

func (EnvironmentHandler) GetEnvironment

func (eh EnvironmentHandler) GetEnvironment(ctx context.Context, appName, envName string) (*environmentModels.Environment, error)

GetEnvironment Handler for GetEnvironment

func (EnvironmentHandler) GetEnvironmentSummary

func (eh EnvironmentHandler) GetEnvironmentSummary(ctx context.Context, appName string) ([]*environmentModels.EnvironmentSummary, error)

GetEnvironmentSummary handles api calls and returns a slice of EnvironmentSummary data for each environment

func (EnvironmentHandler) GetJob

func (eh EnvironmentHandler) GetJob(ctx context.Context, appName, envName, jobComponentName, jobName string) (*deploymentModels.ScheduledJobSummary, error)

GetJob Gets job by name

func (EnvironmentHandler) GetJobPayload

func (eh EnvironmentHandler) GetJobPayload(ctx context.Context, appName, envName, jobComponentName, jobName string) (io.ReadCloser, error)

GetJobPayload Gets job payload

func (EnvironmentHandler) GetJobs

func (eh EnvironmentHandler) GetJobs(ctx context.Context, appName, envName, jobComponentName string) ([]deploymentModels.ScheduledJobSummary, error)

GetJobs Get jobs

func (EnvironmentHandler) GetLogs

func (eh EnvironmentHandler) GetLogs(ctx context.Context, appName, envName, podName string, sinceTime *time.Time, logLines *int64, previousLog bool, follow bool) (io.ReadCloser, error)

GetLogs handler for GetLogs

func (EnvironmentHandler) GetScheduledJobLogs

func (eh EnvironmentHandler) GetScheduledJobLogs(ctx context.Context, appName, envName, scheduledJobName, replicaName string, sinceTime *time.Time, logLines *int64, follow bool) (io.ReadCloser, error)

GetScheduledJobLogs handler for GetScheduledJobLogs

func (EnvironmentHandler) ResetManuallyStoppedComponentsInEnvironment

func (eh EnvironmentHandler) ResetManuallyStoppedComponentsInEnvironment(ctx context.Context, appName, envName string) error

ResetManuallyStoppedComponentsInEnvironment Starts all components in the environment

func (EnvironmentHandler) ResetScaledComponent

func (eh EnvironmentHandler) ResetScaledComponent(ctx context.Context, appName, envName, componentName string, ignoreComponentStatusError bool) error

ResetScaledComponent Starts a component

func (EnvironmentHandler) RestartApplication

func (eh EnvironmentHandler) RestartApplication(ctx context.Context, appName string) error

RestartApplication Restarts all components in all environments of the application

func (EnvironmentHandler) RestartBatch

func (eh EnvironmentHandler) RestartBatch(ctx context.Context, appName, envName, jobComponentName, batchName string) error

RestartBatch Restart a scheduled or stopped batch

func (EnvironmentHandler) RestartComponent

func (eh EnvironmentHandler) RestartComponent(ctx context.Context, appName, envName, componentName string, ignoreComponentStatusError bool) error

RestartComponent Restarts a component

func (EnvironmentHandler) RestartComponentAuxiliaryResource

func (eh EnvironmentHandler) RestartComponentAuxiliaryResource(ctx context.Context, appName, envName, componentName, auxType string) error

RestartComponentAuxiliaryResource Restarts a component's auxiliary resource

func (EnvironmentHandler) RestartEnvironment

func (eh EnvironmentHandler) RestartEnvironment(ctx context.Context, appName, envName string) error

RestartEnvironment Restarts all components in the environment

func (EnvironmentHandler) RestartJob

func (eh EnvironmentHandler) RestartJob(ctx context.Context, appName, envName, jobComponentName, jobName string) error

RestartJob Start running or stopped job by name

func (EnvironmentHandler) ScaleComponent

func (eh EnvironmentHandler) ScaleComponent(ctx context.Context, appName, envName, componentName string, replicas int) error

ScaleComponent Scale a component replicas

func (EnvironmentHandler) StartApplication

func (eh EnvironmentHandler) StartApplication(ctx context.Context, appName string) error

StartApplication Starts all components in all environments of the application

func (EnvironmentHandler) StopAllBatches

func (eh EnvironmentHandler) StopAllBatches(ctx context.Context, appName, envName, jobComponentName string) error

StopAllBatches Stop all batches

func (EnvironmentHandler) StopAllBatchesAndJobsForEnvironment

func (eh EnvironmentHandler) StopAllBatchesAndJobsForEnvironment(ctx context.Context, appName, envName string) error

StopAllBatchesAndJobsForEnvironment Stop all batches and single jobs for the environment

func (EnvironmentHandler) StopAllBatchesAndJobsForJobComponent

func (eh EnvironmentHandler) StopAllBatchesAndJobsForJobComponent(ctx context.Context, appName, envName, jobComponentName string) error

StopAllBatchesAndJobsForJobComponent Stop all scheduled batches in the job-component

func (EnvironmentHandler) StopAllJobs

func (eh EnvironmentHandler) StopAllJobs(ctx context.Context, appName, envName, jobComponentName string) error

StopAllJobs Stop all jobs

func (EnvironmentHandler) StopApplication

func (eh EnvironmentHandler) StopApplication(ctx context.Context, appName string) error

StopApplication Stops all components in all environments of the application

func (EnvironmentHandler) StopBatch

func (eh EnvironmentHandler) StopBatch(ctx context.Context, appName, envName, jobComponentName, batchName string) error

StopBatch Stop batch by name

func (EnvironmentHandler) StopComponent

func (eh EnvironmentHandler) StopComponent(ctx context.Context, appName, envName, componentName string, ignoreComponentStatusError bool) error

StopComponent Stops a component

func (EnvironmentHandler) StopEnvironment

func (eh EnvironmentHandler) StopEnvironment(ctx context.Context, appName, envName string) error

StopEnvironment Stops all components in the environment

func (EnvironmentHandler) StopJob

func (eh EnvironmentHandler) StopJob(ctx context.Context, appName, envName, jobComponentName, jobName string) error

StopJob Stop job by name

type EnvironmentHandlerFactory

type EnvironmentHandlerFactory func(accounts models.Accounts) EnvironmentHandler

EnvironmentHandlerFactory defines a factory function for EnvironmentHandler

func NewEnvironmentHandlerFactory

func NewEnvironmentHandlerFactory(opts ...EnvironmentHandlerOptions) EnvironmentHandlerFactory

NewEnvironmentHandlerFactory creates a new EnvironmentHandlerFactory

type EnvironmentHandlerOptions

type EnvironmentHandlerOptions func(*EnvironmentHandler)

EnvironmentHandlerOptions defines a configuration function

func WithAccounts

func WithAccounts(accounts models.Accounts) EnvironmentHandlerOptions

WithAccounts configures all EnvironmentHandler fields

func WithEventHandler

func WithEventHandler(eventHandler events.EventHandler) EnvironmentHandlerOptions

WithEventHandler configures the eventHandler used by EnvironmentHandler

func WithTLSValidator

func WithTLSValidator(validator tlsvalidation.Validator) EnvironmentHandlerOptions

WithTLSValidator configures the tlsValidator used by EnvironmentHandler

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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