common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version  string
	NodeID   string
	LogLevel string
	LogPath  string
)

Version of plugin, should be filed during compilation

View Source
var (
	NodeConfigPath       string
	ControllerConfigPath string
)
View Source
var PluginName = "iscsi.csi.joviandss.open-e.com"

Plugin name

Functions

func GetContext

func GetContext(traceId string) context.Context

func GetLogger

func GetLogger(logLevel string, toFile string) (*logrus.Logger, error)

func JBase32FromStr

func JBase32FromStr(in string) (out string)

Takes inut string and converts it to JBase64 string

func JBase32ToStr

func JBase32ToStr(in string) (out string, err error)

Takes JBase64 input and extracts original string

func LFC

func LFC(ctx context.Context) *logrus.Entry

Logger From Context

func SetupConfig

func SetupConfig(path string, c *JovianDSSCfg) error

GetConfing reads Config from config file

func WithLogger

func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context

Types

type ISCSIEndpointCfg

type ISCSIEndpointCfg struct {
	Vnamelen int      `json:"namelen,omitempty"`
	Vpasslen int      `json:"passlen,omitempty"`
	Iqn      string   `json:"iqn,omitempty"`
	Addrs    []string `json:"addrs,omitempty"`
	Port     int      `json:"port,omitempty"`
}

type JDSSLoggerContextID

type JDSSLoggerContextID int

type JovianDSSCfg

type JovianDSSCfg struct {
	LLevel string `yaml:"loglevel"`
	LDest  string `yaml:"logfile"`
	Pool   string `yaml:"pool"`

	RestEndpointCfg  RestEndpointCfg  `yaml:"endpoint"`
	ISCSIEndpointCfg ISCSIEndpointCfg `yaml:"iscsi"`
}

ControllerCfg stores configaration properties of controller instance

type RestEndpointCfg

type RestEndpointCfg struct {
	Addrs       []string `json:"addrs,omitempty"`
	Port        int      `json:"port,omitempty"`
	Prot        string   `json:"prot,omitempty"`
	User        string   `json:"user,omitempty"`
	Pass        string   `json:"pass,omitempty"`
	IdleTimeOut string   `json:"idletimeout,omitempty"`
	Tries       int      `json:"tries,omitempty"`
}

Jump to

Keyboard shortcuts

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