Documentation
¶
Index ¶
- func AbortCredentialTransition(token string) error
- func BeginCredentialTransition() (string, error)
- func Clear() error
- func CompleteCredentialTransition(token string) error
- func CredentialTransitionPending() bool
- func Get(server, tool string, args json.RawMessage) ([]byte, int, bool)
- func GetMetadata(server, tool string, args json.RawMessage) (time.Duration, time.Duration, bool)
- func OrphanedCredentialTransitions() ([]string, error)
- func Put(server, tool string, args json.RawMessage, content []byte, exitCode int, ...) error
- func RecoverCredentialTransition() error
- func RemoveCredentialTransition(token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortCredentialTransition ¶ added in v1.1.0
AbortCredentialTransition re-enables caching when the caller proves that the attempted transition did not change credentials. Other concurrent markers continue to keep the cache fail-closed.
func BeginCredentialTransition ¶ added in v1.1.0
BeginCredentialTransition prevents cache reads and writes before OAuth credentials can change. The marker remains until a daemon has closed its credential-bound connections and cleared all pre-transition responses.
func Clear ¶ added in v1.1.0
func Clear() error
Clear invalidates every cached tool response. This is intentionally global: entries created before credential-aware invalidation cannot be attributed to a particular OAuth account safely.
func CompleteCredentialTransition ¶ added in v1.1.0
CompleteCredentialTransition clears any writes that raced with transition startup, then re-enables caching by removing the fail-closed marker.
func CredentialTransitionPending ¶ added in v1.1.0
func CredentialTransitionPending() bool
CredentialTransitionPending reports whether response caching and credential-bound daemon work must remain fail-closed.
func GetMetadata ¶
GetMetadata returns cache age and ttl when a valid entry exists.
func OrphanedCredentialTransitions ¶ added in v1.1.0
OrphanedCredentialTransitions reports markers whose owning process no longer holds the transition lock. It does not mutate cache or marker state; a running daemon must coordinate invalidation with its cache guard and pool.
func Put ¶
func Put(server, tool string, args json.RawMessage, content []byte, exitCode int, ttl time.Duration) error
Put stores a response in the cache.
func RecoverCredentialTransition ¶ added in v1.1.0
func RecoverCredentialTransition() error
RecoverCredentialTransition lets a freshly started daemon safely complete a transition left pending because the previous daemon could not be reached.
func RemoveCredentialTransition ¶ added in v1.1.0
RemoveCredentialTransition re-enables caching after the caller has established the credential boundary and invalidated pre-transition entries.
Types ¶
This section is empty.