uniqueness

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uniqueness provides shared identity-claim primitives for queue drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

MemoryStore holds TTL claims within one queue backend instance. Its zero value is ready for use.

func (*MemoryStore) Acquire

func (s *MemoryStore) Acquire(key string, ttl time.Duration) (uint64, bool)

Acquire claims key for ttl and returns an ownership token when no live claim exists.

func (*MemoryStore) Release

func (s *MemoryStore) Release(key string, token uint64)

Release removes key only when token still owns its current claim.

Jump to

Keyboard shortcuts

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