bookclerk_library::entities::event_deliveries

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

SeaORM entity for per-subscriber event_deliveries.

Item Kind Summary
Model struct Row shape for this table (DeriveEntityModel).
ColumnIter struct An iterator over the variants of [Column]
Entity struct Generated by sea-orm-macros
PrimaryKeyIter struct An iterator over the variants of [PrimaryKey]
ActiveModel struct Generated by sea-orm-macros
RelationIter struct An iterator over the variants of [Relation]
Column enum Generated by sea-orm-macros
PrimaryKey enum Generated by sea-orm-macros
Relation enum Declared SeaORM relations (parent event is queried by event_id).

Structs

Model

pub struct Model {
    pub id: String,
    pub event_id: String,
    pub plugin_id: String,
    pub idempotency_key: String,
    pub state: String,
    pub attempt_count: i64,
    pub max_attempts: i64,
    pub lease_owner: Option<String>,
    pub lease_expires_at: Option<String>,
    pub lease_generation: i64,
    pub run_after: String,
    pub invocation_sequence: i64,
    pub resume_pending: i64,
    pub checkpoint_json: Option<String>,
    pub checkpoint_schema_version: i64,
    pub ordering_key: String,
    pub outcome: Option<String>,
    pub error_message: Option<String>,
    pub created_at: String,
    pub updated_at: String,
    pub cancel_requested: i64,
    pub resource_class: String,
    pub wake_event_type: String,
    pub wake_filter_json: String,
    pub wake_grants_json: String,
    pub queue_name: String,
}

Row shape for this table (DeriveEntityModel).

Fields

  • id: Stable delivery id ({event_id}:{plugin_id}).
  • event_id: Parent super::domain_events id.
  • plugin_id: Subscriber plugin id.
  • idempotency_key: Stable idempotency key independent of attempt/generation.
  • state: Lifecycle state (pending, running, acked, rejected, dead_letter).
  • attempt_count: Number of times a worker has claimed this row (not incremented on resume).
  • max_attempts: Maximum claims before a failure becomes dead_letter.
  • lease_owner: Worker id that currently holds the lease, when state = running.
  • lease_expires_at: RFC 3339 lease expiry.
  • lease_generation: Per-claim generation used to fence heartbeat and finalization.
  • run_after: RFC 3339 time after which a pending delivery may be claimed.
  • invocation_sequence: Resume ordinal distinct from Self::attempt_count.
  • resume_pending: 1 when the next claim should resume rather than increment attempt.
  • checkpoint_json: Bounded checkpoint JSON from EventResult::Suspended.
  • checkpoint_schema_version: Checkpoint schema version.
  • ordering_key: FIFO key (book uuid for book_acquired).
  • outcome: Terminal outcome (ack, reject, dead_letter) when finished.
  • error_message: Operator-facing error or reject reason.
  • created_at: RFC 3339 insert time.
  • updated_at: RFC 3339 last-modified time.
  • cancel_requested: Cooperative cancel flag (0 / 1); running workers check on heartbeat.
  • resource_class: Concurrency class copied from the catalog (network today).
  • wake_event_type: Event type that can wake this suspended delivery; empty = timestamp-only.
  • wake_filter_json: Host-owned payload object filter JSON for event-wake; empty = type only.
  • wake_grants_json: Host-derived wake grants JSON (schemaVersions + intersected filter).
  • queue_name: Queue of the parent event, copied at dispatch.

Model::into_ex

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Implements: Clone, Debug, Eq, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

ColumnIter

pub struct ColumnIter {
    /* private fields */
}

An iterator over the variants of Column

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Entity

pub struct Entity;

Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic

PrimaryKeyIter

pub struct PrimaryKeyIter {
    /* private fields */
}

An iterator over the variants of PrimaryKey

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

ActiveModel

pub struct ActiveModel {
    pub id: ActiveValue<String>,
    pub event_id: ActiveValue<String>,
    pub plugin_id: ActiveValue<String>,
    pub idempotency_key: ActiveValue<String>,
    pub state: ActiveValue<String>,
    pub attempt_count: ActiveValue<i64>,
    pub max_attempts: ActiveValue<i64>,
    pub lease_owner: ActiveValue<Option<String>>,
    pub lease_expires_at: ActiveValue<Option<String>>,
    pub lease_generation: ActiveValue<i64>,
    pub run_after: ActiveValue<String>,
    pub invocation_sequence: ActiveValue<i64>,
    pub resume_pending: ActiveValue<i64>,
    pub checkpoint_json: ActiveValue<Option<String>>,
    pub checkpoint_schema_version: ActiveValue<i64>,
    pub ordering_key: ActiveValue<String>,
    pub outcome: ActiveValue<Option<String>>,
    pub error_message: ActiveValue<Option<String>>,
    pub created_at: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
    pub cancel_requested: ActiveValue<i64>,
    pub resource_class: ActiveValue<String>,
    pub wake_event_type: ActiveValue<String>,
    pub wake_filter_json: ActiveValue<String>,
    pub wake_grants_json: ActiveValue<String>,
    pub queue_name: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • id: Generated by sea-orm-macros
  • event_id: Generated by sea-orm-macros
  • plugin_id: Generated by sea-orm-macros
  • idempotency_key: Generated by sea-orm-macros
  • state: Generated by sea-orm-macros
  • attempt_count: Generated by sea-orm-macros
  • max_attempts: Generated by sea-orm-macros
  • lease_owner: Generated by sea-orm-macros
  • lease_expires_at: Generated by sea-orm-macros
  • lease_generation: Generated by sea-orm-macros
  • run_after: Generated by sea-orm-macros
  • invocation_sequence: Generated by sea-orm-macros
  • resume_pending: Generated by sea-orm-macros
  • checkpoint_json: Generated by sea-orm-macros
  • checkpoint_schema_version: Generated by sea-orm-macros
  • ordering_key: Generated by sea-orm-macros
  • outcome: Generated by sea-orm-macros
  • error_message: Generated by sea-orm-macros
  • created_at: Generated by sea-orm-macros
  • updated_at: Generated by sea-orm-macros
  • cancel_requested: Generated by sea-orm-macros
  • resource_class: Generated by sea-orm-macros
  • wake_event_type: Generated by sea-orm-macros
  • wake_filter_json: Generated by sea-orm-macros
  • wake_grants_json: Generated by sea-orm-macros
  • queue_name: Generated by sea-orm-macros

Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

RelationIter

pub struct RelationIter {
    /* private fields */
}

An iterator over the variants of Relation

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Enums

Column

pub enum Column {
    Id,
    EventId,
    PluginId,
    IdempotencyKey,
    State,
    AttemptCount,
    MaxAttempts,
    LeaseOwner,
    LeaseExpiresAt,
    LeaseGeneration,
    RunAfter,
    InvocationSequence,
    ResumePending,
    CheckpointJson,
    CheckpointSchemaVersion,
    OrderingKey,
    Outcome,
    ErrorMessage,
    CreatedAt,
    UpdatedAt,
    CancelRequested,
    ResourceClass,
    WakeEventType,
    WakeFilterJson,
    WakeGrantsJson,
    QueueName,
}

Generated by sea-orm-macros

Variants

  • Id: Generated by sea-orm-macros
  • EventId: Generated by sea-orm-macros
  • PluginId: Generated by sea-orm-macros
  • IdempotencyKey: Generated by sea-orm-macros
  • State: Generated by sea-orm-macros
  • AttemptCount: Generated by sea-orm-macros
  • MaxAttempts: Generated by sea-orm-macros
  • LeaseOwner: Generated by sea-orm-macros
  • LeaseExpiresAt: Generated by sea-orm-macros
  • LeaseGeneration: Generated by sea-orm-macros
  • RunAfter: Generated by sea-orm-macros
  • InvocationSequence: Generated by sea-orm-macros
  • ResumePending: Generated by sea-orm-macros
  • CheckpointJson: Generated by sea-orm-macros
  • CheckpointSchemaVersion: Generated by sea-orm-macros
  • OrderingKey: Generated by sea-orm-macros
  • Outcome: Generated by sea-orm-macros
  • ErrorMessage: Generated by sea-orm-macros
  • CreatedAt: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros
  • CancelRequested: Generated by sea-orm-macros
  • ResourceClass: Generated by sea-orm-macros
  • WakeEventType: Generated by sea-orm-macros
  • WakeFilterJson: Generated by sea-orm-macros
  • WakeGrantsJson: Generated by sea-orm-macros
  • QueueName: Generated by sea-orm-macros

Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator

PrimaryKey

pub enum PrimaryKey {
    Id,
}

Generated by sea-orm-macros

Variants

  • Id: Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait

Relation

pub enum Relation {}

Declared SeaORM relations (parent event is queried by event_id).

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

Generated from crates/bookclerk-library at main · View as Markdown