stickystore

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// Get returns the installation ID for the given key. ok is false on
	// cache miss or if the backend is unreachable (callers fall back to
	// round-robin).
	Get(ctx context.Context, key string) (installationID int64, ok bool, err error)

	// Put persists a mapping. scope, identity, and subject are stored by
	// backends that support operator debuggability (e.g. Firestore);
	// backends that do not need them may ignore them.
	Put(ctx context.Context, key string, installationID int64, scope, identity, subject string) error
}

Store persists sticky (scope, identity) -> installation ID mappings for checks:write policies. Implementations must be safe for concurrent use.

func New

New creates a Store from the given env config. Returns nil (no store) if StickyStore is empty. The returned io.Closer must be closed when the store is no longer needed (it may close underlying clients).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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