internal

package
v0.0.0-...-10602be Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKubeFiler

func GetKubeFiler(ctx context.Context, kubeClient kubeclient.Client, namespace, name string) (*kubefilerv1alpha1.KubeFiler, error)

func GetKubeFilerExport

func GetKubeFilerExport(ctx context.Context, kubeClient kubeclient.Client, namespace, name string) (*kubefilerv1alpha1.KubeFilerExport, error)

func GetSecret

func GetSecret(ctx context.Context, kubeClient kubeclient.Client, namespace, name string) (*corev1.Secret, error)

func GetService

func GetService(ctx context.Context, kubeClient kubeclient.Client, namespace, name string) (*corev1.Service, error)

Types

type Idempotent

type Idempotent interface {
	// The CSI data types are generated using a protobuf.
	// The generated structures are guaranteed to implement the Stringer interface.
	// Example: https://github.com/container-storage-interface/spec/blob/master/lib/go/csi/csi.pb.go#L3508
	// We can use the generated string as the key of our internal inflight database of requests.
	String() string
}

Idempotent is the interface required to manage in flight requests.

type InFlight

type InFlight struct {
	// contains filtered or unexported fields
}

InFlight is a struct used to manage in flight requests per volumeId.

func NewInFlight

func NewInFlight() *InFlight

NewInFlight instanciates a InFlight structures.

func (*InFlight) Delete

func (db *InFlight) Delete(key string)

Delete removes the entry from the inFlight entries map. It doesn't return anything, and will do nothing if the specified key doesn't exist.

func (*InFlight) Insert

func (db *InFlight) Insert(key string) bool

Insert inserts the entry to the current list of inflight request key is volumeId for node and req hash for controller . Returns false when the key already exists.

Jump to

Keyboard shortcuts

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