Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemoryPingStore ¶
type InMemoryPingStore struct {
// contains filtered or unexported fields
}
InMemoryPingStore keeps ping timestamps in memory with concurrency safety.
func NewInMemoryPingStore ¶
func NewInMemoryPingStore() *InMemoryPingStore
NewInMemoryPingStore constructs a new in-memory ping store.
func (*InMemoryPingStore) LastProcessed ¶
LastProcessed returns the timestamp of the latest processed ping.
func (*InMemoryPingStore) SetProcessed ¶
SetProcessed stores the provided timestamp as the latest processed ping.
type PingStore ¶
type PingStore interface {
// SetProcessed stores the timestamp of a processed ping message.
SetProcessed(ctx context.Context, ts time.Time) error
// LastProcessed returns the timestamp of the most recently processed ping message.
LastProcessed(ctx context.Context) (time.Time, error)
}
PingStore persists timestamps of processed ping messages.
Click to show internal directories.
Click to hide internal directories.