Documentation ¶
Index ¶
Constants ¶
const ServiceConfig = `` /* 292-byte string literal not displayed */
ServiceConfig is used when building CSIDriverProvider clients. The configured retry parameters ensures that RPCs will be retried if the underlying connection is not ready.
For more details see: https://github.com/grpc/grpc/blob/master/doc/service_config.md
Variables ¶
This section is empty.
Functions ¶
func MountContent ¶
func MountContent(ctx context.Context, client v1alpha1.CSIDriverProviderClient, attributes, secrets, permission string, oldObjectVersions map[string]string) (map[string]string, map[string][]byte, error)
MountContent calls the client's Mount() RPC with helpers to format the request and interpret the response.
Types ¶
type PluginClientBuilder ¶
type PluginClientBuilder struct {
// contains filtered or unexported fields
}
PluginClientBuilder builds and stores grpc clients for communicating with provider plugins.
func NewPluginClientBuilder ¶
func NewPluginClientBuilder(paths []string, opts ...grpc.DialOption) *PluginClientBuilder
NewPluginClientBuilder creates a PluginClientBuilder that will connect to plugins in the provided absolute path to a folder. Plugin servers must listen to the unix domain socket at:
<path>/<plugin_name>.sock
where <plugin_name> must match the PluginNameRe regular expression.
Additional grpc dial options can also be set through opts and will be used when creating all clients.
func (*PluginClientBuilder) Cleanup ¶
func (p *PluginClientBuilder) Cleanup()
Cleanup closes all underlying connections and removes all clients.
func (*PluginClientBuilder) Get ¶
func (p *PluginClientBuilder) Get(ctx context.Context, provider string) (v1alpha1.CSIDriverProviderClient, error)
Get returns a CSIDriverProviderClient for the provider. If an existing client is not found a new one will be created and added to the PluginClientBuilder.
func (*PluginClientBuilder) HealthCheck ¶
func (p *PluginClientBuilder) HealthCheck(ctx context.Context, interval time.Duration)
HealthCheck enables periodic healthcheck for configured provider clients by making a Version() RPC call. If the provider healthcheck fails, we log an error.
This method blocks until the parent context is canceled during termination.