mount

package
v0.0.0-...-0320a89 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultFilesystem defines the standard filesystem if nothing else is provided.
	DefaultFilesystem = "ext4"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

Option defines a single option function.

type Options

type Options struct {
}

Options defines the available options for this package.

type PublishOpts

type PublishOpts struct {
	Volume     *model.Volume
	Target     string
	Staging    string
	IsBlock    bool
	Readonly   bool
	FSType     string
	MountFlags []string
}

PublishOpts defines the available options for the publish handler.

type Service

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

Service defines the service for the mount component.

func NewService

func NewService(opts ...Option) *Service

NewService simply initializes a new mount service.

func (*Service) Exists

func (s *Service) Exists(ctx context.Context, target string) (bool, error)

Exists is checking if volume path exists.

func (*Service) Publish

func (s *Service) Publish(ctx context.Context, opts PublishOpts) error

Publish is publishing the request volume.

func (*Service) Stage

func (s *Service) Stage(ctx context.Context, opts StageOpts) error

Stage is staging the request volume.

func (*Service) Unpublish

func (s *Service) Unpublish(ctx context.Context, opts UnpublishOpts) error

Unpublish is unpublishing the request volume.

func (*Service) Unstage

func (s *Service) Unstage(ctx context.Context, opts UnstageOpts) error

Unstage is unstaging the request volume.

type StageOpts

type StageOpts struct {
	Volume     *model.Volume
	Target     string
	FSType     string
	MountFlags []string
}

StageOpts defines the available options for the stage handler.

type UnpublishOpts

type UnpublishOpts struct {
	Volume *model.Volume
	Target string
}

UnpublishOpts defines the available options for the unpublish handler.

type UnstageOpts

type UnstageOpts struct {
	Volume *model.Volume
	Target string
}

UnstageOpts defines the available options for the unstage handler.

Jump to

Keyboard shortcuts

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