csidriver

package
v0.0.0-...-fa7f690 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 18 Imported by: 0

Documentation

Overview

* Copyright 2020-2023 Alibaba Group Holding Limited.

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.

* Copyright 2020-2023 Alibaba Group Holding Limited.

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.

* Copyright 2020-2023 Alibaba Group Holding Limited.

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.

* Copyright 2020-2023 Alibaba Group Holding Limited.

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.

* Copyright 2020-2023 Alibaba Group Holding Limited.

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

View Source
const MaxVolumesPerNode = 1000

MaxVolumesPerNode is the maximum number of volumes supported per node.

Variables

View Source
var (
	VineyardSocketPrefix = "/var/run/vineyard-kubernetes"
	VineyardSocket       = "vineyard.sock"

	// VineyardNamespaceKey is the key for the vineyard name in the volume context
	VineyardNamespaceKey = "k8s.v6d.io/vineyard/namespace"

	// VineyardNameKey is the key for the vineyard name in the volume context
	VineyardNameKey = "k8s.v6d.io/vineyard/name"
)

Functions

func ParseEndpoint

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

Types

type Driver

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

func NewDriver

func NewDriver(nodeID, endpoint string) *Driver

func (*Driver) Run

func (d *Driver) Run()

type IdentityServer

type IdentityServer struct {
}

func NewIdentityServer

func NewIdentityServer() *IdentityServer

func (*IdentityServer) GetPluginCapabilities

func (*IdentityServer) GetPluginInfo

func (*IdentityServer) Probe

type VineyardCSI

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

func NewVineyardCSI

func NewVineyardCSI(stateFilePath string, nodeID string) *VineyardCSI

func (*VineyardCSI) ControllerExpandVolume

func (*VineyardCSI) ControllerGetVolume

func (*VineyardCSI) CreateSnapshot

func (*VineyardCSI) CreateVolume

func (*VineyardCSI) DeleteSnapshot

func (*VineyardCSI) DeleteVolume

func (*VineyardCSI) GetCapacity

func (*VineyardCSI) ListSnapshots

func (*VineyardCSI) ListVolumes

func (*VineyardCSI) NodeExpandVolume

func (*VineyardCSI) NodeGetCapabilities

func (*VineyardCSI) NodeGetInfo

func (*VineyardCSI) NodeGetVolumeStats

func (*VineyardCSI) NodePublishVolume

func (*VineyardCSI) NodeStageVolume

func (*VineyardCSI) NodeUnpublishVolume

func (*VineyardCSI) NodeUnstageVolume

type Volume

type Volume struct {
	VolName        string
	VolID          string
	VolSize        int64
	VolPath        string
	NodeID         string
	ReadOnlyAttach bool
	Attched        bool
}

type VolumeStates

type VolumeStates struct {
	Volumes       []Volume
	StateFilePath string
}

func NewVolumeStates

func NewVolumeStates(statefilePath string) (*VolumeStates, error)

func (*VolumeStates) AddVolume

func (s *VolumeStates) AddVolume(v Volume) error

func (*VolumeStates) DeleteVolume

func (s *VolumeStates) DeleteVolume(volID string) error

func (*VolumeStates) GetVolumeByID

func (s *VolumeStates) GetVolumeByID(volID string) (Volume, error)

func (*VolumeStates) GetVolumeByName

func (s *VolumeStates) GetVolumeByName(volName string) (Volume, error)

Jump to

Keyboard shortcuts

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