drivers

package
v0.0.0-...-7c2645f Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UsernameOpt = "username"
	PasswordOpt = "password"
	DomainOpt   = "domain"
	SecurityOpt = "security"
	FileModeOpt = "fileMode"
	DirModeOpt  = "dirMode"
	CifsOpts    = "cifsopts"
)

Constants defining driver paremeters

View Source
const (
	ShareOpt  = "share"
	CreateOpt = "create"
)
View Source
const (
	NfsOptions   = "nfsopts"
	DefaultNfsV3 = "port=2049,nolock,proto=tcp"
)
View Source
const (
	NfsCacheOptions   = "nfsopts"
	DefaultNfsCacheV3 = "port=2049,nolock,proto=tcp"
)
View Source
const (
	CephOptions = "cephopts"
)
View Source
const (
	EfsTemplateURI = "%s.efs.%s.amazonaws.com"
)
View Source
const (
	MetaDataURL = "http://169.254.169.254/latest/dynamic/instance-identity/document"
)
View Source
const (
	ShareSplitIndentifer = "#"
)

Variables

View Source
var (
	ErrorEmpty = fmt.Errorf("Response was empty")
	ErrorParse = fmt.Errorf("Could not parse A record")
)
View Source
var (
	EmptyMap = map[string]string{}
)

Functions

func NewCephDriver

func NewCephDriver(root string, username string, password string, context string, cephmount string, cephport string, localmount string, cephopts string, mounts *MountManager) cephDriver

func NewEFSDriver

func NewEFSDriver(root, nameserver string, resolve bool, mounts *MountManager) efsDriver

func NewNFSCacheDriver

func NewNFSCacheDriver(root string, version int, nfsopts string, mounts *MountManager, path string, state string, lazyUmount bool, timeoutMount int) nfsCacheDriver

func NewNFSDriver

func NewNFSDriver(root string, version int, nfsopts string, mounts *MountManager) nfsDriver

Types

type CifsCreds

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

CifsCreds contains Options for cifs-mount

func NewCifsCredentials

func NewCifsCredentials(user, pass, domain, security, fileMode, dirMode string) *CifsCreds

NewCifsCredentials setting the credentials

func (*CifsCreds) String

func (creds *CifsCreds) String() string

type CifsDriver

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

CifsDriver driver structure

func NewCIFSDriver

func NewCIFSDriver(root string, creds *CifsCreds, netrc, cifsopts string, mounts *MountManager) CifsDriver

NewCIFSDriver creating the cifs driver

func (CifsDriver) Capabilities

func (v CifsDriver) Capabilities() *volume.CapabilitiesResponse

func (CifsDriver) Create

func (v CifsDriver) Create(r *volume.CreateRequest) error

func (CifsDriver) Get

func (v CifsDriver) Get(r *volume.GetRequest) (*volume.GetResponse, error)

func (CifsDriver) List

func (v CifsDriver) List() (*volume.ListResponse, error)

func (CifsDriver) Mount

Mount do the mounting

func (CifsDriver) Path

func (v CifsDriver) Path(r *volume.PathRequest) (*volume.PathResponse, error)

func (CifsDriver) Remove

func (v CifsDriver) Remove(r *volume.RemoveRequest) error

func (CifsDriver) Unmount

func (c CifsDriver) Unmount(r *volume.UnmountRequest) error

Unmount do the unmounting

type DriverType

type DriverType int
const (
	CIFS DriverType = iota
	NFS
	EFS
	CEPH
)

func (DriverType) String

func (dt DriverType) String() string

type Lookup

type Lookup interface {
	Lookup(name string) (string, error)
}

type MountManager

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

func NewVolumeManager

func NewVolumeManager() *MountManager

func (*MountManager) Add

func (m *MountManager) Add(name, hostdir string)

func (*MountManager) AddMount

func (m *MountManager) AddMount(name string, hostdir string, connections int)

func (*MountManager) Count

func (m *MountManager) Count(name string) int

func (*MountManager) Create

func (m *MountManager) Create(name, hostdir string, opts map[string]string) *mount

func (*MountManager) Decrement

func (m *MountManager) Decrement(name string) int

func (*MountManager) Delete

func (m *MountManager) Delete(name string) error

func (*MountManager) DeleteIfNotManaged

func (m *MountManager) DeleteIfNotManaged(name string) error

func (*MountManager) GetOption

func (m *MountManager) GetOption(name, key string) string

func (*MountManager) GetOptionAsBool

func (m *MountManager) GetOptionAsBool(name, key string) bool

func (*MountManager) GetOptions

func (m *MountManager) GetOptions(name string) map[string]string

func (*MountManager) GetVolumes

func (m *MountManager) GetVolumes(rootPath string) []*volume.Volume

func (*MountManager) HasMount

func (m *MountManager) HasMount(name string) bool

func (*MountManager) HasOption

func (m *MountManager) HasOption(name, key string) bool

func (*MountManager) HasOptions

func (m *MountManager) HasOptions(name string) bool

func (*MountManager) Increment

func (m *MountManager) Increment(name string) int

func (*MountManager) IsActiveMount

func (m *MountManager) IsActiveMount(name string) bool

type Resolver

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

func NewDefaultResolver

func NewDefaultResolver() *Resolver

func NewResolver

func NewResolver(serverString string) *Resolver

func (*Resolver) Lookup

func (l *Resolver) Lookup(name string) (string, error)

Jump to

Keyboard shortcuts

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