sidecarmounter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GCSFuseAppName = "gke-gcs-fuse-csi"

Variables

This section is empty.

Functions

func NewErrorWriter

func NewErrorWriter(errorFile string) io.Writer

Types

type Interface

type Interface interface {
	// Mount mounts bucket using a file descriptor passed via a unix domain socket.
	Mount(mc *MountConfig) (*exec.Cmd, error)
	// GetCmds returns a list of gcsfuse process cmds.
	GetCmds() []*exec.Cmd
}

Interface defines the set of methods to allow for gcsfuse mount operations on a system.

func New

func New(mounterPath string) Interface

New returns a sidecarmounter.Interface for the current system. It provides an option to specify the path to `gcsfuse` binary.

type MountConfig

type MountConfig struct {
	FileDescriptor int       `json:"-"`
	VolumeName     string    `json:"volume_name,omitempty"`
	BucketName     string    `json:"bucket_name,omitempty"`
	TempDir        string    `json:"-"`
	Options        []string  `json:"options,omitempty"`
	ErrWriter      io.Writer `json:"-"`
}

MountConfig contains the information gcsfuse needs.

type Mounter

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

Mounter provides the default implementation of sidecarmounter.Interface for the linux platform. This implementation assumes that the gcsfuse is installed in the host's root mount namespace.

func (*Mounter) GetCmds

func (m *Mounter) GetCmds() []*exec.Cmd

func (*Mounter) Mount

func (m *Mounter) Mount(mc *MountConfig) (*exec.Cmd, error)

Jump to

Keyboard shortcuts

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