internal

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

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.

func NewInFlight

func NewInFlight() *InFlight

NewInFlight instanciates a InFlight structures.

func (*InFlight) Delete

func (db *InFlight) Delete(h Idempotent)

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(entry Idempotent) bool

Insert inserts the entry to the current list of inflight requests. 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