service

package
v0.0.0-...-5b0754e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkAsFailed

func MarkAsFailed(repo *persistence.Repository, env *model.Environment, originalError error) error

MarkAsFailed Useful inside of transactions

Types

type Catalyst

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

func NewCatalyst

func (*Catalyst) CreateEnvironmentAsync

func (c *Catalyst) CreateEnvironmentAsync(env *model.Environment) error

CreateEnvironmentAsync Function will deploy the environment to the target cluster, but will not wait to confirm that creation was successful

func (*Catalyst) CreateToken

func (c *Catalyst) CreateToken(token *model.Token) (string, error)

func (*Catalyst) DeleteEnvironment

func (c *Catalyst) DeleteEnvironment(id uint) error

func (*Catalyst) GetAllEnvironments

func (c *Catalyst) GetAllEnvironments() (*[]model.Environment, error)

func (*Catalyst) GetChart

func (c *Catalyst) GetChart(chartName string) (*kubernetes.ChartDetails, error)

func (*Catalyst) GetCharts

func (c *Catalyst) GetCharts() []kubernetes.ChartConfig

func (*Catalyst) GetEnvironment

func (c *Catalyst) GetEnvironment(id uint) (*model.Environment, error)

func (*Catalyst) GetEnvironmentDeleted

func (c *Catalyst) GetEnvironmentDeleted(id uint, ifDeleted bool) (*model.Environment, error)

func (*Catalyst) GetEnvironmentLogs

func (c *Catalyst) GetEnvironmentLogs(id uint) ([]kubernetes.PodLogs, error)

func (*Catalyst) GetEnvironmentsByOwner

func (c *Catalyst) GetEnvironmentsByOwner(ownerId uint) (*[]model.Environment, error)

func (*Catalyst) GetToken

func (c *Catalyst) GetToken(id uint) (*model.Token, error)

func (*Catalyst) GetTokens

func (c *Catalyst) GetTokens() (*[]model.Token, error)

func (*Catalyst) StreamContainerLogs

func (c *Catalyst) StreamContainerLogs(
	id uint,
	containerNames []StreamParams,
	notifyError func(error),
	notifyEvent func(kubernetes.PodContainerLogs),
)

type EnvironmentService

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

func NewEnvironmentService

func NewEnvironmentService(
	repo *persistence.Repository,
	hc *kubernetes.HelmClient,
	kchrts kubernetes.KnownCharts,
) *EnvironmentService

func (*EnvironmentService) MarkAsFailed

func (es *EnvironmentService) MarkAsFailed(env *model.Environment, originalError error) error

func (*EnvironmentService) UpdateDeploymentStatusFor

func (es *EnvironmentService) UpdateDeploymentStatusFor(env *model.Environment)

UpdateDeploymentStatusFor verifies that a K8s deployment succeeded. Performs active waiting so it should normally be called in its own goroutine

type StreamParams

type StreamParams struct {
	AppName       string
	ContainerName string
}

Jump to

Keyboard shortcuts

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