longhorndev

package
v0.0.0-...-a9d2760 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SocketDirectory = "/var/run"
	DevPath         = "/dev/longhorn/"

	WaitInterval = time.Second
	WaitCount    = 30
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceCreator

type DeviceCreator interface {
	NewDevice(name string, size int64, frontend string) (DeviceService, error)
}

type DeviceService

type DeviceService interface {
	GetFrontend() string
	SetFrontend(frontend string) error
	UnsetFrontendCheck() error
	UnsetFrontend()
	GetEndpoint() string
	Enabled() bool

	InitDevice() error
	Start() error
	Shutdown() error
	PrepareUpgrade() error
	FinishUpgrade() error
	Expand(size int64) error
}

type LonghornDevice

type LonghornDevice struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func (*LonghornDevice) Enabled

func (d *LonghornDevice) Enabled() bool

func (*LonghornDevice) Expand

func (d *LonghornDevice) Expand(size int64) (err error)

func (*LonghornDevice) FinishUpgrade

func (d *LonghornDevice) FinishUpgrade() (err error)

func (*LonghornDevice) GetEndpoint

func (d *LonghornDevice) GetEndpoint() string

func (*LonghornDevice) GetFrontend

func (d *LonghornDevice) GetFrontend() string

func (*LonghornDevice) GetSocketPath

func (d *LonghornDevice) GetSocketPath() string

func (*LonghornDevice) InitDevice

func (d *LonghornDevice) InitDevice() error

func (*LonghornDevice) PrepareUpgrade

func (d *LonghornDevice) PrepareUpgrade() error

func (*LonghornDevice) ReloadSocketConnection

func (d *LonghornDevice) ReloadSocketConnection() error

func (*LonghornDevice) SetFrontend

func (d *LonghornDevice) SetFrontend(frontend string) error

func (*LonghornDevice) Shutdown

func (d *LonghornDevice) Shutdown() error

func (*LonghornDevice) Start

func (d *LonghornDevice) Start() error

func (*LonghornDevice) UnsetFrontend

func (d *LonghornDevice) UnsetFrontend()

func (*LonghornDevice) UnsetFrontendCheck

func (d *LonghornDevice) UnsetFrontendCheck() error

func (*LonghornDevice) WaitForSocket

func (d *LonghornDevice) WaitForSocket(stopCh chan struct{}) chan error

type LonghornDeviceCreator

type LonghornDeviceCreator struct{}

func (*LonghornDeviceCreator) NewDevice

func (ldc *LonghornDeviceCreator) NewDevice(name string, size int64, frontend string, scsiTimeout, iscsiAbortTimeout, iscsiTargetRequestTimeout int64) (DeviceService, error)

Jump to

Keyboard shortcuts

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