mount

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeVolume string = "volume"
	TypeBind   string = "bind"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BindConfig

type BindConfig struct {
	Allowed   bool
	Allowlist []string
	Denylist  []string
}

type BindMounter

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

func NewBindMounter

func NewBindMounter(cfg BindConfig) *BindMounter

func (*BindMounter) Mount

func (m *BindMounter) Mount(ctx context.Context, mnt *Mount) error

func (*BindMounter) Unmount

func (m *BindMounter) Unmount(ctx context.Context, mnt *Mount) error

type Mount

type Mount struct {
	Type   string `json:"type,omitempty"`
	Source string `json:"source,omitempty"`
	Target string `json:"target,omitempty"`
}

type Mounter

type Mounter interface {
	Mount(ctx context.Context, mnt *Mount) error
	Unmount(ctx context.Context, mnt *Mount) error
}

type MultiMounter

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

func NewMultiMounter

func NewMultiMounter() *MultiMounter

func (*MultiMounter) Mount

func (m *MultiMounter) Mount(ctx context.Context, mnt *Mount) error

func (*MultiMounter) RegisterMounter

func (m *MultiMounter) RegisterMounter(mtype string, mr Mounter)

func (*MultiMounter) Unmount

func (m *MultiMounter) Unmount(ctx context.Context, mnt *Mount) error

type VolumeMounter

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

func NewVolumeMounter

func NewVolumeMounter() (*VolumeMounter, error)

func (*VolumeMounter) Mount

func (m *VolumeMounter) Mount(ctx context.Context, mn *Mount) error

func (*VolumeMounter) Unmount

func (m *VolumeMounter) Unmount(ctx context.Context, mn *Mount) error

Jump to

Keyboard shortcuts

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