config

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInsecureSkipVerify = true

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NsMap map[string]NsData `yaml:"nexentastor_map"`
	Debug bool              `yaml:"debug,omitempty"`
	// contains filtered or unexported fields
}

Config - driver config from file

func New

func New(lookUpDir string) (*Config, error)

New - find config file and create config instance

func (*Config) GetFilePath

func (c *Config) GetFilePath() string

GetFilePath - get filepath of found config file

func (*Config) Refresh

func (c *Config) Refresh(secret string) (changed bool, err error)

Refresh - read and validate config, return `true` if config has been changed

func (*Config) Validate

func (c *Config) Validate() error

Validate - validate current config

type NsData

type NsData struct {
	Address                    string `yaml:"restIp"`
	Username                   string `yaml:"username"`
	Password                   string `yaml:"password"`
	Zone                       string `yaml: "zone"`
	DefaultVolumeGroup         string `yaml:"defaultVolumeGroup,omitempty"`
	DefaultTargetGroup         string `yaml:"defaultTargetGroup,omitempty"`
	DefaultTarget              string `yaml:"defaultTarget,omitempty"`
	DefaultHostGroup           string `yaml:"defaultHostGroup,omitempty"`
	DefaultISCSIPort           string `yaml:"defaultiSCSIPort,omitempty"`
	DefaultDataIP              string `yaml:"defaultDataIp,omitempty"`
	ISCSITargetPrefix          string `yaml:"iSCSITargetPrefix,omitempty"`
	ISCSITimeout               string `yaml:"iSCSITimeout,omitempty"`
	DynamicTargetLunAllocation *bool  `yaml:"dynamicTargetLunAllocation"`
	NumOfLunsPerTarget         string `yaml:"numOfLunsPerTarget"`
	UseChapAuth                string `yaml:"useChapAuth"`
	ChapUser                   string `yaml:"chapUser"`
	ChapSecret                 string `yaml:"chapSecret"`
	MountPointPermissions      string `yaml:"mountPointPermissions"`
	InsecureSkipVerify         *bool  `yaml:"insecureSkipVerify,omitempty"`
}

Jump to

Keyboard shortcuts

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