storage

package
v4.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package storage provide base operations for storage

Package storage provide base operations for storage

Index

Constants

View Source
const (
	// SuccessCode defines error code of success
	SuccessCode = int64(0)

	// UserUnauthorized defines error code of user unauthorized
	UserUnauthorized int64 = -401

	// UserOffline defines error code of user off line
	UserOffline int64 = 1077949069

	// IPLockErrorCode defines error code of ip lock
	IPLockErrorCode int64 = 1077949071

	// ShareNotExist defines error code of share not exist
	ShareNotExist int64 = 1077939717

	// AuthUserNotExist defines error code of auth user not exit
	AuthUserNotExist int64 = 1077939719

	// NFSShareNotExist defines error code of NFS share not exist
	NFSShareNotExist int64 = 1077939726

	// FilesystemNotExist defines error code of filesystem not exist
	FilesystemNotExist int64 = 1073752065

	// SharePathInvalid defines error code of share path invalid
	SharePathInvalid int64 = 1077939729

	// ShareAlreadyExist defines error code of share already exist
	ShareAlreadyExist int64 = 1077939724

	// SharePathAlreadyExist defines error code of share path already exist
	SharePathAlreadyExist int64 = 1077940500

	// SystemBusy defines error code of system busy
	SystemBusy int64 = 1077949006

	// MsgTimeOut defines error code of msg timeout
	MsgTimeOut int64 = 1077949001
)

Error Code

View Source
const (
	// DefaultVStore defines the default vstore name
	DefaultVStore string = "System_vStore"

	// DefaultVStoreID defines the default vstore ID
	DefaultVStoreID string = "0"

	// QueryCountPerBatch defines query count for each circle of batch operation
	QueryCountPerBatch int = 100

	// Unconnected defines the error msg of unconnected
	Unconnected = "unconnected"

	// LocalUserType defines the user type of local
	LocalUserType = "0"

	// MaxStorageThreads defines max threads of each storage
	MaxStorageThreads = 100

	// UninitializedStorage defines uninitialized storage
	UninitializedStorage = "UninitializedStorage"

	// LocalFilesystemMode normal volume
	LocalFilesystemMode string = "0"

	// HyperMetroFilesystemMode hyper metro volume
	HyperMetroFilesystemMode string = "1"

	// GetInfoWaitInternal defines wait internal of getting info
	GetInfoWaitInternal = 10 * time.Second

	// CharsetUtf8 defines a constant representing the UTF-8 character set
	CharsetUtf8 = "UTF_8"
)

Others

Variables

View Source
var (
	// RequestSemaphoreMap stores the total connection num of each storage
	RequestSemaphoreMap = map[string]*utils.Semaphore{UninitializedStorage: utils.NewSemaphore(MaxStorageThreads)}
)

Functions

This section is empty.

Types

type HTTP

type HTTP interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTP defines for http request process

func NewHTTPClientByBackendID

func NewHTTPClientByBackendID(ctx context.Context, backendID string) (HTTP, error)

NewHTTPClientByBackendID provides a new http client by backend id

func NewHTTPClientByCertMeta

func NewHTTPClientByCertMeta(ctx context.Context, useCert bool, certMeta string) (HTTP, error)

NewHTTPClientByCertMeta provides a new http client by cert meta

type NewClientConfig

type NewClientConfig struct {
	Urls            []string
	User            string
	SecretName      string
	SecretNamespace string
	ParallelNum     string
	BackendID       string
	UseCert         bool
	CertSecretMeta  string
	Storage         string
	Name            string
}

NewClientConfig stores the information needed to create a new rest client

Directories

Path Synopsis
dme
aseries/client
Package client provides DME A-series storage client
Package client provides DME A-series storage client
aseries/volume
Package volume defines operations of volumes
Package volume defines operations of volumes
fusionstorage
attacher
Package attacher provide storage mapping or unmapping
Package attacher provide storage mapping or unmapping
client
Package client provides fusion storage client
Package client provides fusion storage client
smartx
Package smartx provides operations for qos
Package smartx provides operations for qos
types
Package types defines converged qoS request params
Package types defines converged qoS request params
utils
Package utils to provide Pacific storage tools for csi
Package utils to provide Pacific storage tools for csi
volume
Package volume defines operations of fusion storage
Package volume defines operations of fusion storage
volume/dtree
Package dtree defines operations of fusion storage dtree
Package dtree defines operations of fusion storage dtree
oceanstorage
api
Package api provides all kinds of oceanstor storages restful urls definition
Package api provides all kinds of oceanstor storages restful urls definition
api/rest
Package rest provides operations for rest request
Package rest provides operations for rest request
aseries/client
Package client provides oceanstor A-series storage client
Package client provides oceanstor A-series storage client
aseries/smartx
Package smartx provides operations for a-series storage qos
Package smartx provides operations for a-series storage qos
aseries/volume
Package volume defines operations of volumes
Package volume defines operations of volumes
base
Package base provide base operations for oceanstor base storage
Package base provide base operations for oceanstor base storage
base/attacher
Package attacher provide base operations for volume attach
Package attacher provide base operations for volume attach
oceandisk/attacher
Package attacher provide operations of volume attach
Package attacher provide operations of volume attach
oceandisk/client
Package client provides oceandisk storage client
Package client provides oceandisk storage client
oceandisk/smartx
Package smartx provides operations for storage qos
Package smartx provides operations for storage qos
oceandisk/volume
Package volume is used for OceanDisk base
Package volume is used for OceanDisk base
oceanstor/attacher
Package attacher provide operations of volume attach
Package attacher provide operations of volume attach
oceanstor/client
Package client provides oceanstor storage client
Package client provides oceanstor storage client
oceanstor/clientv6
Package clientv6 defines Urls of oceanstor storage
Package clientv6 defines Urls of oceanstor storage
oceanstor/smartx
Package smartx provides operations for storage qos and snapshot
Package smartx provides operations for storage qos and snapshot
oceanstor/volume
Package volume defines status code of oceanstor storage
Package volume defines status code of oceanstor storage
oceanstor/volume/creator
Package creator provides creator of volume
Package creator provides creator of volume

Jump to

Keyboard shortcuts

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