config

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Pattern:
	// 	static: /var/lib/dragonfly/model-csi/volumes/$volumeName/model
	// dynamic: /var/lib/dragonfly/model-csi/volumes/$volumeName/models
	//          /var/lib/dragonfly/model-csi/volumes/$volumeName/csi.sock
	ServiceName              string     `yaml:"service_name"`
	RootDir                  string     `yaml:"root_dir"`
	ExternalCSIEndpoint      string     `yaml:"external_csi_endpoint"`
	ExternalCSIAuthorization string     `yaml:"external_csi_authorization"`
	DynamicCSIEndpoint       string     `yaml:"dynamic_csi_endpoint"`
	CSIEndpoint              string     `yaml:"csi_endpoint"`
	MetricsAddr              string     `yaml:"metrics_addr"`
	TraceEndpooint           string     `yaml:"trace_endpoint"`
	PprofAddr                string     `yaml:"pprof_addr"`
	PullConfig               PullConfig `yaml:"pull_config"`
	Features                 Features   `yaml:"features"`
	NodeID                   string     // From env CSI_NODE_ID
	Mode                     string     // From env X_CSI_MODE: "controller" or "node"
}

func FromFile

func FromFile(path string) (*Config, error)

func (*Config) GetCSISockDirForDynamic

func (cfg *Config) GetCSISockDirForDynamic(volumeName string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName/csi

func (*Config) GetModelDir

func (cfg *Config) GetModelDir(volumeName string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName/model

func (*Config) GetModelDirForDynamic

func (cfg *Config) GetModelDirForDynamic(volumeName, mountID string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName/models/$mountID/model

func (*Config) GetModelsDirForDynamic

func (cfg *Config) GetModelsDirForDynamic(volumeName string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName/models

func (*Config) GetMountIDDirForDynamic

func (cfg *Config) GetMountIDDirForDynamic(volumeName, mountID string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName/models/$mountID

func (*Config) GetVolumeDir

func (cfg *Config) GetVolumeDir(volumeName string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName

func (*Config) GetVolumeDirForDynamic

func (cfg *Config) GetVolumeDirForDynamic(volumeName string) string

/var/lib/dragonfly/model-csi/volumes/$volumeName

func (*Config) GetVolumesDir

func (cfg *Config) GetVolumesDir() string

/var/lib/dragonfly/model-csi/volumes

func (*Config) IsControllerMode

func (cfg *Config) IsControllerMode() bool

func (*Config) IsNodeMode

func (cfg *Config) IsNodeMode() bool

func (*Config) ParameterKeyCheckDiskQuota

func (cfg *Config) ParameterKeyCheckDiskQuota() string

func (*Config) ParameterKeyMountID

func (cfg *Config) ParameterKeyMountID() string

func (*Config) ParameterKeyReference

func (cfg *Config) ParameterKeyReference() string

func (*Config) ParameterKeyStatusProgress

func (cfg *Config) ParameterKeyStatusProgress() string

func (*Config) ParameterKeyStatusState

func (cfg *Config) ParameterKeyStatusState() string

func (*Config) ParameterKeyType

func (cfg *Config) ParameterKeyType() string

func (*Config) ParameterVolumeContextNodeIP

func (cfg *Config) ParameterVolumeContextNodeIP() string

type Features

type Features struct {
	CheckDiskQuota bool `yaml:"check_disk_quota"`
}

type PullConfig

type PullConfig struct {
	DockerConfigDir           string `yaml:"docker_config_dir"`
	ProxyURL                  string `yaml:"proxy_url"`
	DragonflyEndpoint         string `yaml:"dragonfly_endpoint"`
	Concurrency               uint   `yaml:"concurrency"`
	PullLayerTimeoutInSeconds uint   `yaml:"pull_layer_timeout_in_seconds"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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