Documentation
¶
Overview ¶
Package state is the public SDK facade over Harbor's internal/state package — the identity-scoped StateStore (RFC §3.6, §9; D-204). Alias-based re-exports only: no behavior lives here. Driver factories and validation internals are deliberately private.
Index ¶
Constants ¶
const DefaultDriver = internal.DefaultDriver
DefaultDriver is the driver name Open resolves when the config names none.
Variables ¶
var ( // ErrNotFound — no record under that key. ErrNotFound = internal.ErrNotFound // ErrIdempotencyConflict — an idempotency key was reused divergently. ErrIdempotencyConflict = internal.ErrIdempotencyConflict // ErrIdentityRequired — the identity triple is incomplete. ErrIdentityRequired = internal.ErrIdentityRequired // ErrStoreClosed — the store has been closed. ErrStoreClosed = internal.ErrStoreClosed // ErrInvalidRecord — the record failed validation. ErrInvalidRecord = internal.ErrInvalidRecord // ErrUnknownDriver — the named state driver is not registered. ErrUnknownDriver = internal.ErrUnknownDriver // ErrMaintenanceScopeRequired — ListKind called without the // explicit maintenance scope claim (D-207). ErrMaintenanceScopeRequired = internal.ErrMaintenanceScopeRequired )
Re-exported sentinel errors callers compare via errors.Is.
var From = internal.From
From extracts the store from ctx, reporting presence.
var MustFrom = internal.MustFrom
MustFrom extracts the store from ctx, panicking when absent.
var NewEventID = internal.NewEventID
NewEventID mints a fresh state EventID.
var Open = internal.Open
Open resolves the configured state driver and opens it.
var OpenDriver = internal.OpenDriver
OpenDriver opens a state driver by explicit name.
var RegisteredDrivers = internal.RegisteredDrivers
RegisteredDrivers lists the seated state driver names (blank-import sdk/drivers/prod to seat the production set).
var WithStore = internal.WithStore
WithStore returns a child context carrying the store.
Functions ¶
This section is empty.
Types ¶
type ListScope ¶
ListScope is the explicit scope claim StateStore.ListKind requires (the cross-identity maintenance scan — D-207).
type StateStore ¶
type StateStore = internal.StateStore
StateStore is the identity-mandatory durable state interface.