lifecycle

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package lifecycle is a generated GoMock package.

Index

Constants

View Source
const (
	ComposeAppPath         = "/etc/compose/manifests"
	EmbeddedComposeAppPath = "/usr/local/etc/compose/manifests"
)
View Source
const (
	QuadletAppPath         = "/etc/containers/systemd"
	EmbeddedQuadletAppPath = "/usr/local/etc/containers/systemd"
	QuadletTargetPath      = "/etc/systemd/system/"
	QuadletTargetName      = "flightctl-quadlet-app.target"
)

Variables

This section is empty.

Functions

func BatchStartTimeFromContext added in v1.0.0

func BatchStartTimeFromContext(ctx context.Context) (time.Time, bool)

func ContextWithBatchStartTime added in v1.0.0

func ContextWithBatchStartTime(ctx context.Context, t time.Time) context.Context

Types

type Action

type Action struct {
	// ID of the application
	ID string
	// Name of the application
	Name string
	// Environment variables to be passed to the manifest handler at runtime
	EnvVars map[string]string
	// Type of the action
	Type ActionType
	// AppType of the application
	AppType v1beta1.AppType
	// Path to the application
	Path string
	// Embedded is true if the application is embedded in the device
	Embedded bool
	// Volumes is a list of volume names related to this application
	Volumes []Volume
}

type ActionHandler

type ActionHandler interface {
	Execute(ctx context.Context, actions ...*Action) error
}

type ActionHandlerType

type ActionHandlerType string
const (
	ActionHandlerCompose ActionHandlerType = "compose"
)

type ActionType

type ActionType string
const (
	ActionAdd    ActionType = "add"
	ActionRemove ActionType = "remove"
	ActionUpdate ActionType = "update"
)

type Compose

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

func NewCompose

func NewCompose(log *log.PrefixLogger, writer fileio.Writer, podman *client.Podman) *Compose

func (*Compose) Execute

func (c *Compose) Execute(ctx context.Context, actions ...*Action) error

type MockActionHandler added in v1.0.0

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

MockActionHandler is a mock of ActionHandler interface.

func NewMockActionHandler added in v1.0.0

func NewMockActionHandler(ctrl *gomock.Controller) *MockActionHandler

NewMockActionHandler creates a new mock instance.

func (*MockActionHandler) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockActionHandler) Execute added in v1.0.0

func (m *MockActionHandler) Execute(ctx context.Context, actions ...*Action) error

Execute mocks base method.

type MockActionHandlerMockRecorder added in v1.0.0

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

MockActionHandlerMockRecorder is the mock recorder for MockActionHandler.

func (*MockActionHandlerMockRecorder) Execute added in v1.0.0

func (mr *MockActionHandlerMockRecorder) Execute(ctx any, actions ...any) *gomock.Call

Execute indicates an expected call of Execute.

type Quadlet added in v1.0.0

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

func NewQuadlet added in v1.0.0

func NewQuadlet(log *log.PrefixLogger, rw fileio.ReadWriter, systemdManager systemd.Manager, podman *client.Podman) *Quadlet

func (*Quadlet) Execute added in v1.0.0

func (q *Quadlet) Execute(ctx context.Context, actions ...*Action) error

type Volume added in v0.8.1

type Volume struct {
	ID            string
	Reference     string
	ReclaimPolicy v1beta1.ApplicationVolumeReclaimPolicy
}

Jump to

Keyboard shortcuts

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