package promise

import "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise"

Index

Types

type LockingMutable

type LockingMutable interface {
	Mutable

	// SetLocked is like Set but the caller must already hold the lock
	SetLocked(interface{})

	// GetLocked is like Get but the caller must already hold the lock
	GetLocked() interface{}
}

LockingMutable is a Mutable whose implementation is protected by a lock

type Mutable

type Mutable interface {

	// Set writes a value into this variable and unblocks every
	// goroutine waiting for this variable to have a value
	Set(interface{})

	// Get reads the value of this variable.  If this variable is
	// not set yet then this call blocks until this variable gets a value.
	Get() interface{}
}

Mutable is a variable that is initially not set and can be set one or more times (unlike a traditional "promise", which can be written only once).

Source Files

interface.go

Directories

PathSynopsis
pkg/util/flowcontrol/fairqueuing/promise/lockingpromise
Version
v0.17.14
Published
Nov 13, 2020
Platform
linux/amd64
Last checked
57 seconds ago

Tools for package owners.