Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetPVCLabelsRequest ¶
type GetPVCLabelsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` NameSpace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` }
GetPVCLabelsRequest defines API request type
type GetPVCLabelsResponse ¶
type GetPVCLabelsResponse struct {
Parameters map[string]string `` /* 161-byte string literal not displayed */
}
GetPVCLabelsResponse defines API response type
type MetadataRetrieverClient ¶
type MetadataRetrieverClient interface {
GetPVCLabels(context.Context, *GetPVCLabelsRequest) (*GetPVCLabelsResponse, error)
}
MetadataRetrieverClient is the interface for retrieving metadata.
type MetadataRetrieverClientType ¶
type MetadataRetrieverClientType struct {
// contains filtered or unexported fields
}
MetadataRetrieverClientType holds client connection and timeout
func NewMetadataRetrieverClient ¶
func NewMetadataRetrieverClient(conn *grpc.ClientConn, timeout time.Duration) *MetadataRetrieverClientType
NewMetadataRetrieverClient returns csiclient
func (*MetadataRetrieverClientType) GetPVCLabels ¶
func (s *MetadataRetrieverClientType) GetPVCLabels( ctx context.Context, req *GetPVCLabelsRequest) ( *GetPVCLabelsResponse, error, )
GetPVCLabels gets the PVC labels and returns it
type Plugin ¶
type Plugin struct { // MetadataRetriever is the eponymous CSI service. MetadataRetrieverService service.Service // ServerOpts is a list of gRPC server options used when serving // the SP. This list should not include a gRPC interceptor option // as one is created automatically based on the interceptor configuration // or provided list of interceptors. ServerOpts []grpc.ServerOption // Interceptors is a list of gRPC server interceptors to use when // serving the SP. This list should not include the interceptors // defined in the GoCSI package as those are configured by default // based on runtime configuration settings. Interceptors []grpc.UnaryServerInterceptor // BeforeServe is an optional callback that is invoked after the // StoragePlugin has been initialized, just prior to the creation // of the gRPC server. This callback may be used to perform custom // initialization logic, modify the interceptors and server options, // or prevent the server from starting by returning a non-nil error. BeforeServe func(context.Context, *Plugin, net.Listener) error // EnvVars is a list of default environment variables and values. EnvVars []string // RegisterAdditionalServers allows the driver to register additional // grpc servers on the same grpc connection. These can be used // for proprietary extensions. RegisterAdditionalServers func(*grpc.Server) // contains filtered or unexported fields }
Plugin is the collection of services and data used to server a new gRPC endpoint that acts as a CSI storage plug-in (SP).
func (*Plugin) GracefulStop ¶
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.
func (*Plugin) Serve ¶
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.
type PluginProvider ¶
type PluginProvider 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) }
PluginProvider is able to serve a gRPC endpoint that provides the CSI services: Retriever