commons

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName = "irods.csi.cyverse.org"
)

Variables

This section is empty.

Functions

func DecreaseCounterForActiveVolumeMount

func DecreaseCounterForActiveVolumeMount()

DecreaseCounterForActiveVolumeMount decreases the counter for active volume mounts

func GetDriverVersion

func GetDriverVersion() string

GetDriverVersion returns driver version in string

func GetVersionJSON

func GetVersionJSON() (string, error)

GetVersionJSON returns VersionInfo object in JSON string

func IncreaseCounterForActiveVolumeMount

func IncreaseCounterForActiveVolumeMount()

IncreaseCounterForActiveVolumeMount increases the counter for active volume mounts

func IncreaseCounterForVolumeMount

func IncreaseCounterForVolumeMount()

IncreaseCounterForVolumeMount increases the counter for volume mount

func IncreaseCounterForVolumeMountFailures

func IncreaseCounterForVolumeMountFailures()

IncreaseCounterForVolumeMountFailures increases the counter for volume mount failures

func IncreaseCounterForVolumeUnmount

func IncreaseCounterForVolumeUnmount()

IncreaseCounterForVolumeUnmount increases the counter for volume unmount

func IncreaseCounterForVolumeUnmountFailures

func IncreaseCounterForVolumeUnmountFailures()

IncreaseCounterForVolumeUnmountFailures increases the counter for volume unmount failures

func IsValidClientType

func IsValidClientType(client ClientType) bool

IsValidClientType checks whether client is supported.

func MergeConfig

func MergeConfig(driverConfig *Config, driverSecrets map[string]string, volSecrets map[string]string, volParams map[string]string) map[string]string

MergeConfig merges configuration params

func ParseServiceEndpoint

func ParseServiceEndpoint(endpoint string) (string, string, error)

ParseServiceEndpoint parses irodsfsd endpoint string

func RedactConfig

func RedactConfig(config map[string]string) map[string]string

RedactConfig redacts sensitive values

Types

type ClientType

type ClientType string

ClientType is a mount client type

const (
	// IrodsFuseClientType is for iRODS FUSE
	IrodsFuseClientType ClientType = "irodsfuse"
	// WebdavClientType is for WebDav client (Davfs2)
	WebdavClientType ClientType = "webdav"
	// NfsClientType is for NFS client
	NfsClientType ClientType = "nfs"
)

mount driver (iRODS Client) types

func ParseClientType

func ParseClientType(params map[string]string) (ClientType, error)

ParseClientType returns the requested client type. Omitting client preserves the existing iRODS FUSE default for backwards compatibility.

type Config

type Config struct {
	ServiceEndpoint         string     // CSI Service endpoint
	DriverMode              DriverMode // CSI driver mode
	NodeID                  string     // node ID
	SecretPath              string     // Secret mount path
	IRODSFSDServiceEndpoint string     // iRODS FSD Service endpoint
	PrometheusExporterPort  int        // Prometheus Exporter Service port
}

Config holds the parameters list which can be configured

func (*Config) GetDriverMode

func (config *Config) GetDriverMode() DriverMode

func (*Config) GetIRODSFSDServiceEndpoint

func (config *Config) GetIRODSFSDServiceEndpoint() string

func (*Config) GetServiceEndpoint

func (config *Config) GetServiceEndpoint() string

func (*Config) MakeWorkDirs

func (config *Config) MakeWorkDirs() error

MakeWorkDirs makes dirs required

func (*Config) Validate

func (config *Config) Validate() error

Validate validates configuration

type DriverMode

type DriverMode string

DriverMode determines which CSI service is exposed by this process.

const (
	ControllerDriverMode DriverMode = "controller"
	NodeDriverMode       DriverMode = "node"
)

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"`
}

VersionInfo object contains version related info

func GetVersion

func GetVersion() VersionInfo

GetVersion returns VersionInfo object

Jump to

Keyboard shortcuts

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