csi

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGoPlugins

func LoadGoPlugins(ctx context.Context, filePaths ...string) (err error)

LoadGoPlugins reads the value of the environment variable CSI_GOPLUGINS, a CSV with each element being the absolute path to a shared object file -- a Go plug-in.

Types

type MutexWithTryLock

type MutexWithTryLock interface {
	// Lock locks the mutex.
	Lock()
	// Unlock unlocks the mutex.
	Unlock()
	// TryLock attempts to obtain a lock but times out if no lock
	// can be obtained in the specified duration. A flag is returned
	// indicating whether or not the lock was obtained.
	TryLock(timeout time.Duration) bool
}

MutexWithTryLock is a lock object that implements the semantics of a sync.Mutex in addition to a TryLock function.

func NewMutexWithTryLock

func NewMutexWithTryLock() MutexWithTryLock

NewMutexWithTryLock returns a new mutex that implements TryLock.

type PipeConn

type PipeConn interface {
	net.Listener

	// DialGrpc is used by a grpc client.
	DialGrpc(raddr string, timeout time.Duration) (net.Conn, error)

	// DialHTTP16 is used by <=Go 1.6 net.http clients.
	DialHTTP16(network, addr string) (net.Conn, error)

	// DialHTTP17 is used by >=Go 1.7 net.http clients.
	DialHTTP17(ctx context.Context, network, addr string) (net.Conn, error)
}

PipeConn is an in-memory network connection that can be provided to a Serve function as a net.Listener and to gRPC/net.http clients as their dialer.

func NewPipeConn

func NewPipeConn(name string) PipeConn

NewPipeConn returns a new pipe connection. The provided name is returned by PipeConn.Addr().String().

type ServiceProvider

type ServiceProvider interface {

	// Serve accepts incoming connections on the listener lis, creating
	// a new ServerTransport and service goroutine for each. The service
	// goroutine read gRPC requests and then call the registered handlers
	// to reply to them. Serve returns when lis.Accept fails with fatal
	// errors.  lis will be closed when this method returns.
	// Serve always returns non-nil error.
	Serve(ctx context.Context, lis net.Listener) error

	// Stop stops the gRPC server. It immediately closes all open
	// connections and listeners.
	// It cancels all active RPCs on the server side and the corresponding
	// pending RPCs on the client side will get notified by connection
	// errors.
	Stop(ctx context.Context)

	// GracefulStop stops the gRPC server gracefully. It stops the server
	// from accepting new connections and RPCs and blocks until all the
	// pending RPCs are finished.
	GracefulStop(ctx context.Context)
}

ServiceProvider is a gRPC endpoint that provides the CSI services: Controller, Identity, Node.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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