state

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

View Source
const DefaultDriver = internal.DefaultDriver

DefaultDriver is the driver name Open resolves when the config names none.

Variables

View Source
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.

From extracts the store from ctx, reporting presence.

View Source
var MustFrom = internal.MustFrom

MustFrom extracts the store from ctx, panicking when absent.

View Source
var NewEventID = internal.NewEventID

NewEventID mints a fresh state EventID.

Open resolves the configured state driver and opens it.

View Source
var OpenDriver = internal.OpenDriver

OpenDriver opens a state driver by explicit name.

View Source
var RegisteredDrivers = internal.RegisteredDrivers

RegisteredDrivers lists the seated state driver names (blank-import sdk/drivers/prod to seat the production set).

View Source
var WithStore = internal.WithStore

WithStore returns a child context carrying the store.

Functions

This section is empty.

Types

type EventID

type EventID = internal.EventID

EventID identifies one appended state event.

type ListScope

type ListScope = internal.ListScope

ListScope is the explicit scope claim StateStore.ListKind requires (the cross-identity maintenance scan — D-207).

type StateRecord

type StateRecord = internal.StateRecord

StateRecord is one stored state record.

type StateStore

type StateStore = internal.StateStore

StateStore is the identity-mandatory durable state interface.

Jump to

Keyboard shortcuts

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