driver

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDataLocality added in v1.1.3

func CheckDataLocality(dataLocality *datalocality.DataLocality, dataCenter *string) error

func GetLocalSocket added in v1.1.0

func GetLocalSocket(volumeID string) string

func GetVersionJSON

func GetVersionJSON() (string, error)

func ParseEndpoint

func ParseEndpoint(ep string) (string, string, error)

Types

type Config

type Config struct {
	// Region          string
	Filer string
}

Config holds values to configure the driver

type ControllerServer

type ControllerServer struct {
	csi.UnimplementedControllerServer

	Driver *SeaweedFsDriver
}

func NewControllerServer

func NewControllerServer(d *SeaweedFsDriver) *ControllerServer

func (*ControllerServer) ControllerExpandVolume

func (*ControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout. Default supports all capabilities

func (*ControllerServer) ControllerPublishVolume

ControllerPublishVolume we need this just only for csi-attach, but we do nothing here generally

func (*ControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume we need this just only for csi-attach, but we do nothing here generally

func (*ControllerServer) CreateVolume

func (*ControllerServer) DeleteVolume

type IdentityServer

type IdentityServer struct {
	Driver *SeaweedFsDriver
}

func NewIdentityServer

func NewIdentityServer(d *SeaweedFsDriver) *IdentityServer

func (*IdentityServer) GetPluginCapabilities

func (*IdentityServer) GetPluginInfo

func (*IdentityServer) Probe

type KeyMutex added in v1.1.0

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

func NewKeyMutex added in v1.1.0

func NewKeyMutex() *KeyMutex

func (*KeyMutex) GetMutex added in v1.1.0

func (km *KeyMutex) GetMutex(key string) *sync.Mutex

func (*KeyMutex) RemoveMutex added in v1.1.0

func (km *KeyMutex) RemoveMutex(key string)

type Mounter

type Mounter interface {
	Mount(target string) (Unmounter, error)
}

type NodeServer

type NodeServer struct {
	csi.UnimplementedNodeServer

	Driver *SeaweedFsDriver
	// contains filtered or unexported fields
}

func NewNodeServer

func NewNodeServer(n *SeaweedFsDriver) *NodeServer

func (*NodeServer) NodeCleanup added in v1.1.9

func (ns *NodeServer) NodeCleanup()

func (*NodeServer) NodeExpandVolume

func (*NodeServer) NodeGetCapabilities

func (*NodeServer) NodeGetInfo

func (*NodeServer) NodePublishVolume

func (*NodeServer) NodeStageVolume

func (*NodeServer) NodeUnpublishVolume

func (*NodeServer) NodeUnstageVolume

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
	// Waits for the service to stop
	Wait()
	// Stops the service gracefully
	Stop()
	// Stops the service forcefully
	ForceStop()
}

Defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

type SeaweedFsDriver

type SeaweedFsDriver struct {
	ConcurrentWriters int
	CacheCapacityMB   int
	CacheDir          string
	UidMap            string
	GidMap            string

	DataCenter   string
	DataLocality datalocality.DataLocality

	RunNode       bool
	RunController bool
	// contains filtered or unexported fields
}

func NewSeaweedFsDriver

func NewSeaweedFsDriver(name, filer, nodeID, endpoint string, enableAttacher bool) *SeaweedFsDriver

func (*SeaweedFsDriver) AddControllerServiceCapabilities

func (n *SeaweedFsDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)

func (*SeaweedFsDriver) AddVolumeCapabilityAccessModes

func (n *SeaweedFsDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode)

func (*SeaweedFsDriver) AdjustedUrl

func (d *SeaweedFsDriver) AdjustedUrl(location *filer_pb.Location) string

func (*SeaweedFsDriver) GetDataCenter added in v1.1.0

func (d *SeaweedFsDriver) GetDataCenter() string

func (*SeaweedFsDriver) Run

func (n *SeaweedFsDriver) Run()

func (*SeaweedFsDriver) ValidateControllerServiceRequest

func (d *SeaweedFsDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error

func (*SeaweedFsDriver) WithFilerClient

func (d *SeaweedFsDriver) WithFilerClient(streamingMode bool, fn func(filer_pb.SeaweedFilerClient) error) error

type Unmounter added in v1.1.0

type Unmounter interface {
	Unmount() error
}

type VersionInfo

type VersionInfo struct {
	DriverVersion string `json:"driverVersion"`
	GitCommit     string `json:"gitCommit"`
	BuildDate     string `json:"buildDate"`
	GoVersion     string `json:"goVersion"`
	Compiler      string `json:"compiler"`
	Platform      string `json:"platform"`
}

func GetVersion

func GetVersion() VersionInfo

type Volume added in v1.1.0

type Volume struct {
	VolumeId   string
	StagedPath string
	// contains filtered or unexported fields
}

func NewVolume added in v1.1.0

func NewVolume(volumeID string, mounter Mounter) *Volume

func (*Volume) Publish added in v1.1.0

func (vol *Volume) Publish(stagingTargetPath string, targetPath string, readOnly bool) error

func (*Volume) Quota added in v1.1.9

func (vol *Volume) Quota(sizeByte int64) error

func (*Volume) Stage added in v1.1.0

func (vol *Volume) Stage(stagingTargetPath string) error

func (*Volume) Unpublish added in v1.1.0

func (vol *Volume) Unpublish(targetPath string) error

func (*Volume) Unstage added in v1.1.0

func (vol *Volume) Unstage(stagingTargetPath string) error

Jump to

Keyboard shortcuts

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