util

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0 Imports: 12 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 auth strategy
	OpensdsAuthStrategy = "OPENSDS_AUTH_STRATEGY"
	// Opensds default endpoint
	OpensdsDefaultEndpoint = "http://localhost:50040"

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

func FlushLogs()

func GetCSIClientConn

func GetCSIClientConn(csiEndpoint string) (*grpc.ClientConn, error)

GetCSIClientConn from endpoint

func GetCSIEndPoint

func GetCSIEndPoint(csiEndpoint string) (string, error)

GetCSIEndPoint from environment variable

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