Documentation
¶
Index ¶
- type Memory
- func (m *Memory) Decrement(ctx context.Context, key string, by int64) (int64, error)
- func (m *Memory) Delete(_ context.Context, key string) error
- func (m *Memory) Forever(_ context.Context, key string, value any) error
- func (m *Memory) Get(_ context.Context, key string) (any, error)
- func (m *Memory) Has(_ context.Context, key string) (bool, error)
- func (m *Memory) Increment(ctx context.Context, key string, by int64) (int64, error)
- func (m *Memory) Pull(ctx context.Context, key string) (any, error)
- func (m *Memory) Put(_ context.Context, key string, value any, ttl time.Duration) error
- func (m *Memory) Remember(ctx context.Context, key string, ttl time.Duration, ...) (any, error)
- func (m *Memory) RememberForever(ctx context.Context, key string, compute func() (any, error)) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) Decrement ¶
Decrement atomically decreases the integer value stored at key by the given amount.
func (*Memory) Increment ¶
Increment atomically increases the integer value stored at key by the given amount.
Click to show internal directories.
Click to hide internal directories.