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: 8

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 added in v0.3.0

func FlushLogs()

func GetCSIEndPointListener

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

GetCSIEndPointListener from endpoint

func InitLogs added in v0.3.0

func InitLogs()

func PathExists added in v0.3.0

func PathExists(path string) (bool, error)

Types

type GlogWriter added in v0.3.0

type GlogWriter struct{}

func (GlogWriter) Write added in v0.3.0

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