util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NameSpace for CSI
	NameSpace = "csi"

	// CSI endpoint environment variable name
	CSIEndpoint = "CSI_ENDPOINT"
	// CSI default endpoint
	CSIDefaultEndpoint = "unix://path/to/unix/domain/socket.sock"

	// Opensds endpoint environment variable name
	OpensdsEndpoint = "OPENSDS_ENDPOINT"
	// Opensds default endpoint
	OpensdsDefaultEndpoint = "http://localhost:50040"

	// Opensds auth strategy
	OpensdsAuthStrategy        = "OPENSDS_AUTH_STRATEGY"
	OpensdsDefaultAuthStrategy = "noauth"

	//  Opensds Secondary AZ
	OpensdsSecondaryAZ        = "OPENSDS_SECONDARY_AZ"
	OpensdsDefaultSecondaryAZ = "secondary"

	// CSI  environment variable whether enable the replication function, value can be true or false
	CSIEnableReplication = "CSI_ENABLE_REPLICATION"

	// 1024 * 1024 * 1024
	GiB int64 = 1073741824
)
View Source
const DefaultLogDir = "/var/log/opensds"

Variables

This section is empty.

Functions

func Contained added in v0.5.1

func Contained(obj, target interface{}) bool

Contained ...

func FlushLogs

func FlushLogs()

func GetCSIEndPointListener

func GetCSIEndPointListener(csiEndpoint string) (net.Listener, error)

GetCSIEndPointListener from endpoint

func InitLogs

func InitLogs()

func PathExists

func PathExists(path string) (bool, error)

Types

type GlogWriter

type GlogWriter struct{}

func (GlogWriter) Write

func (writer GlogWriter) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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