volume

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package volume is used to mount volumes inside the job executor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMounter

type MockMounter struct {
	mock.Mock
}

MockMounter is an autogenerated mock type for the Mounter type

func NewMockMounter

func NewMockMounter(t mockConstructorTestingTNewMockMounter) *MockMounter

NewMockMounter creates a new instance of MockMounter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockMounter) Close

func (_m *MockMounter) Close() error

Close provides a mock function with given fields:

func (*MockMounter) MountVolume

func (_m *MockMounter) MountVolume(ctx context.Context, volume *config.Volume, mount *config.MountPoint, directory string) error

MountVolume provides a mock function with given fields: ctx, volume, mount, directory

type MountManager

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

MountManager encapsulates the logic for accessing different mounter instances.

func NewMountManager

func NewMountManager(
	logger logger.Logger,
	ui terminal.UI,
	client client.Client,
	volumeSizeLimit int,
) (*MountManager, error)

NewMountManager returns an instance of MountManager.

func (*MountManager) GetMounter

func (m *MountManager) GetMounter(t Type) (Mounter, error)

GetMounter returns the Mounter instance associated with the type.

type Mounter

type Mounter interface {
	MountVolume(ctx context.Context, volume *config.Volume, mount *config.MountPoint, directory string) error
	Close() error
}

Mounter encapsulates the logic for mounting different types of volumes.

type Type

type Type string

Type represents the volume type.

const (
	VCSType Type = "vcs"
)

Type constants.

Directories

Path Synopsis
Package vcs handles the mounting of VCS volumes (repositories).
Package vcs handles the mounting of VCS volumes (repositories).

Jump to

Keyboard shortcuts

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