config

package
v0.0.0-...-96d2ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PhotonDriver is the driver to handle single attach vmdk-based volumes in Photon Platform
	PhotonDriver = "photon"
	// VMDKDriver is the driver to handle single attach vmdk-based in vSphere/vCenter 6.0+ (deprecated)
	VMDKDriver = "vmdk"
	// VSphereDriver is the driver to handle single attach vmdk-based in vSphere/vCenter 6.0+
	VSphereDriver = "vsphere"
	// VFileDriver is a file sharing volume plugin driver
	VFileDriver = "vfile"

	// DefaultPort is the default ESX service port.
	DefaultPort = 1019

	// Default group ID to use for the socket file
	DefaultGroupID = "root"
)
View Source
const (

	// DefaultVMDKPluginConfigPath is the default location of Log configuration file
	DefaultVMDKPluginConfigPath = "/etc/vsphere-storage-for-docker.conf"
	// DefaultVMDKPluginLogPath is the default location of log (trace) file
	DefaultVMDKPluginLogPath = "/var/log/vsphere-storage-for-docker.log"
	// DefaultVFilePluginConfigPath is the default location of Log configuration file for vFile plugin
	DefaultVFilePluginConfigPath = "/etc/vfile.conf"
	// DefaultVFilePluginLogPath is the default location of log (trace) file for vFile plugin
	DefaultVFilePluginLogPath = "/var/log/vfile.log"

	// MountRoot is the path where VMDK and photon volumes are mounted
	MountRoot = "/mnt/vmdk"

	// VFileMountRoot is the path where vFile volumes are mounted
	VFileMountRoot = "/mnt/vfile"
)

Variables

This section is empty.

Functions

func LogInit

func LogInit(logInfo *LogInfo) bool

LogInit init log with passed logLevel (and get config from configFile if it's present) returns True if using defaults, False if using config file

Types

type Config

type Config struct {
	Driver         string `json:",omitempty"`
	InternalDriver string `json:",omitempty"`
	LogPath        string `json:",omitempty"`
	MaxLogSizeMb   int    `json:",omitempty"`
	MaxLogAgeDays  int    `json:",omitempty"`
	MaxLogFiles    int    `json:",omitempty"`
	LogLevel       string `json:",omitempty"`
	Target         string `json:",omitempty"`
	Project        string `json:",omitempty"`
	Host           string `json:",omitempty"`
	GroupID        string `json:",omitempty"`
}

Config stores the configuration for the plugin

func GetConfig

func GetConfig() Config

func InitConfig

func InitConfig(defaultConfigPath string, defaultLogPath string, defaultDriver string,
	defaultWindowsDriver string) (Config, error)

InitConfig set up driver specific options

func Load

func Load(path string) (Config, error)

Load the configuration from a file and return a Config.

type LogInfo

type LogInfo struct {
	LogLevel       *string
	LogFile        *string
	DefaultLogFile string
	ConfigFile     *string
}

LogInfo stores parameters for setting up logs

Jump to

Keyboard shortcuts

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