Documentation
¶
Overview ¶
Package cloudrun provides automatic persistence backend selection for Cloud Run. Detects Cloud Run via K_SERVICE env var and tries Datastore first, falling back to local files if unavailable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[K comparable, V any] interface { ValidateKey(key K) error Get(ctx context.Context, key K) (V, time.Time, bool, error) Set(ctx context.Context, key K, value V, expiry time.Time) error Delete(ctx context.Context, key K) error Cleanup(ctx context.Context, maxAge time.Duration) (int, error) Location(key K) string Flush(ctx context.Context) (int, error) Len(ctx context.Context) (int, error) Close() error }
Store is the persistence interface returned by New. Matches sfcache.Store so callers can pass it to sfcache.NewTiered.
Click to show internal directories.
Click to hide internal directories.