Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultEntryTTL = 10 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Idempotent ¶
type Idempotent interface {
String() string
}
type InFlight ¶
type InFlight interface { // Get returns true when the key already exists. Get(entry Idempotent) bool // Insert inserts the entry to the current list of in-flight requests. // Returns false when the key already exists. Insert(entry Idempotent) bool // Delete removes the entry from the in-flight entries map. // It doesn't return anything, and will do nothing if the specified key doesn't exist. Delete(entry Idempotent) }
InFlight helps to manage in-flight requests.
type InFlightTTL ¶
type InFlightTTL struct {
// contains filtered or unexported fields
}
func NewWithTTL ¶
func NewWithTTL() *InFlightTTL
func (*InFlightTTL) Delete ¶
func (db *InFlightTTL) Delete(entry Idempotent)
func (*InFlightTTL) Get ¶
func (db *InFlightTTL) Get(entry Idempotent) bool
func (*InFlightTTL) Insert ¶
func (db *InFlightTTL) Insert(entry Idempotent) bool
Click to show internal directories.
Click to hide internal directories.