sendcache

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache deduplicates outgoing messages within a TTL window. Reserve returns true if the (dst, msg) pair is new; false if it was seen within the TTL.

func New

func New(ttl time.Duration) *Cache

New creates a Cache with the given TTL. TTL == 0 disables dedup (Reserve always returns true).

func (*Cache) Reserve

func (c *Cache) Reserve(dst, msg string) bool

Jump to

Keyboard shortcuts

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