internal

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeOperationAlreadyExistsErrorMsg = "An operation with the given Volume %s already exists"
)

Variables

This section is empty.

Functions

This section is empty.

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