Documentation ¶
Index ¶
- Constants
- func DateToUnix(date string) (*timestamp.Timestamp, error)
- func GetLogCSID(ctx context.Context, level int) *log.Logger
- func GetLogCTRL(ctx context.Context, level int) *log.Logger
- func GetLogIDTY(ctx context.Context, level int) *log.Logger
- func GetLogNODE(ctx context.Context, level int) *log.Logger
- func GetLogREST(ctx context.Context, level int) *log.Logger
- func GetLogUTIL(ctx context.Context, level int) *log.Logger
- func GetNewContext(ctx context.Context) context.Context
- func GetValueFromYAML(yamlFilePath string, key string) (string, error)
- func InitLogs(level, driverName, version, nodeID string)
- func IsResourceNameValid(name string) bool
- func SnapshotIdStringFromHref(zfssa, hRef string) (string, error)
- func VolumeIdStringFromHref(zfssa, hRef string) (string, error)
- type Bolt
- type SnapshotId
- type VolumeId
Constants ¶
const ( CSID int = iota // CSI Driver CTRL // Controller Service NODE // Node Service IDTY // Identity Service REST // REST interface UTIL // Utilities that may be controller or node SENTINEL )
const ( VolumeIdLen = 6 VolumeHandleLen = 8 SnapshotIdLen = 7 VolumeHrefLen = 10 SnapshotHrefLen = 12 )
const ( BlockVolume string = "lun" MountVolume = "mnt" )
const ( ResourceNamePattern string = `^[a-zA-Z0-9_\-\.\:]+$` ResourceNameLength int = 64 )
const MAX_LEVEL int = 5
Variables ¶
This section is empty.
Functions ¶
func GetLogCSID ¶
Public function returning the appropriate logger.
func GetNewContext ¶
Creates a new context by duplicating the context passed in and adding a array of loggers with a value added. The value is unique and is generated in this function. That value will be systematically displayed each time any of the loggers in the array are called.
func GetValueFromYAML ¶ added in v1.0.2
func InitLogs ¶
func InitLogs(level, driverName, version, nodeID string)
Log service initialization. The original loggers are created with a prefix identifying the service (service, controller, node, indentifier, REST interface and utility), the node, the driver and its version. These loggers will be clone for each request.
func IsResourceNameValid ¶
func VolumeIdStringFromHref ¶
Types ¶
type SnapshotId ¶
Snapshot ID ----------- This structure is what identifies a volume (lun or filesystem).
func NewSnapshotId ¶
func NewSnapshotId(volumeId *VolumeId, snapshotName string) *SnapshotId
func SnapshotIdFromHref ¶
func SnapshotIdFromHref(zfssa, hRef string) (*SnapshotId, error)
func SnapshotIdFromString ¶
func SnapshotIdFromString(snapshotId string) (*SnapshotId, error)
func (*SnapshotId) GetVolumeId ¶
func (zsi *SnapshotId) GetVolumeId() *VolumeId
func (*SnapshotId) String ¶
func (zsi *SnapshotId) String() string
type VolumeId ¶
Volume ID --------- This structure is what identifies a volume (lun or filesystem).