Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.