csiclient

package
v0.0.0-...-ea4ffcd Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file 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 Amazon.com Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file 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 (
	DefaultImageName      = md.EbsCsiDriver
	DefaultSocketName     = "csi-driver.sock"
	DefaultSocketHostPath = "/var/run/ecs/"
)

Variables

This section is empty.

Functions

func DefaultSocketFilePath

func DefaultSocketFilePath() string

func NewCSIClient

func NewCSIClient(socketIn string) csiClient

NewCSIClient creates a CSI client for the communication with CSI driver daemon.

Types

type CSIClient

type CSIClient interface {
	NodeStageVolume(ctx context.Context,
		volID string,
		publishContext map[string]string,
		stagingTargetPath string,
		fsType string,
		accessMode v1.PersistentVolumeAccessMode,
		secrets map[string]string,
		volumeContext map[string]string,
		mountOptions []string,
		fsGroup *int64,
	) error
	NodeUnstageVolume(ctx context.Context, volumeId, stagingTargetPath string) error
	GetVolumeMetrics(ctx context.Context, volumeId string, hostMountPath string) (*Metrics, error)
	NodeGetCapabilities(ctx context.Context) (*csi.NodeGetCapabilitiesResponse, error)
}

CSIClient is an interface that specifies all supported operations in the Container Storage Interface(CSI) driver for Agent uses. The CSI driver provides many volume related operations to manage the lifecycle of Amazon EBS volumes, including mounting, umounting, resizing and volume stats.

func NewDefaultCSIClient

func NewDefaultCSIClient() CSIClient

Returns a CSI client configured with default settings. The default socket filepath is defined in the respective DefaultSocketFilePath method for each platform (linux/windows).

func NewDummyCSIClient

func NewDummyCSIClient() CSIClient

type Metrics

type Metrics struct {
	// Used represents the total bytes used by the Volume.
	Used int64 `json:"Used"`

	// Capacity represents the total capacity (bytes) of the volume's underlying storage.
	Capacity int64 `json:"Capacity"`
}

Metrics represents the used and capacity bytes of the Volume.

Directories

Path Synopsis
Package mock_csiclient is a generated GoMock package.
Package mock_csiclient is a generated GoMock package.

Jump to

Keyboard shortcuts

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