util

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 14 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 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 Contained added in v0.5.1

func Contained(obj, target interface{}) bool

Contained ...

func FlushLogs

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

func InitLogs()

func IsSupportFstype added in v0.5.1

func IsSupportFstype(fstype string) bool

IsSupportFstype ...

func IsSupportPotocol added in v0.5.1

func IsSupportPotocol(protocol string) bool

IsSupportPotocol ...

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