Files
bifrost/core/schemas/kvstore.go
Beyhan Oğur 880f412e2c first commit
2026-04-26 21:52:23 +03:00

18 lines
549 B
Go

package schemas
import "time"
// KVStore is a minimal interface for a key-value store used by Bifrost internals.
// The concrete implementation (e.g. framework/kvstore.Store) is injected by the
// caller and must satisfy this interface. Passing nil disables KV-backed features.
type KVStore interface {
Get(key string) (any, error)
SetWithTTL(key string, value any, ttl time.Duration) error
SetNXWithTTL(key string, value any, ttl time.Duration) (bool, error)
Delete(key string) (bool, error)
}
const (
DefaultSessionStickyTTL = time.Hour
)