bookclerk_library::entities::nodes
SeaORM entity for durable node identity and liveness observations.
| Item | Kind | Summary |
|---|---|---|
Model |
struct | Row shape for one Bookclerk node in the library. |
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 (nodes are addressed by node_id). |
pub struct Model {
pub node_id: String,
pub library_id: String,
pub created_at: String,
pub incarnation: String,
pub heartbeat_at: String,
pub software_version: String,
pub schema_state: String,
pub compatible: i64,
pub logical_cpus: Option<i64>,
pub cpu_max_quota_us: Option<i64>,
pub cpu_max_period_us: Option<i64>,
pub memory_max_bytes: Option<i64>,
pub memory_current_bytes: Option<i64>,
pub memory_anon_bytes: Option<i64>,
pub files_dir_free_bytes: Option<i64>,
pub scratch_bytes: Option<i64>,
pub target: String,
pub labels_json: String,
pub kind: String,
pub owner_user_id: Option<i64>,
pub share_books: Option<i64>,
pub include_branches: Option<i64>,
pub catalog_fence: i64,
pub catalog_cursor: String,
pub catalog_pass_started_at: Option<String>,
pub catalog_synced_at: Option<String>,
pub catalog_full_pass_at: Option<String>,
pub acquire_members_books: i64,
}
Row shape for one Bookclerk node in the library.
Fields
node_id: Stable node identifier. Not derived from hostname.library_id: Library this node enrolled into.created_at: RFC 3339 timestamp of the first successful registration.incarnation: Latest process incarnation observed for this node.heartbeat_at: RFC 3339 timestamp of the latest heartbeat.software_version: Bookclerk version string reported by the latest heartbeat.schema_state: Schema state display reported by the latest heartbeat.compatible:1when the reporting binary accepted the library schema.logical_cpus:available_parallelism, empty when the probe failed.cpu_max_quota_us: Process cgroupcpu.maxquota in microseconds. Empty when unlimited or missing.cpu_max_period_us: Process cgroupcpu.maxperiod in microseconds. Empty when unlimited or missing.memory_max_bytes: Process cgroupmemory.maxin bytes. Empty when unlimited or missing.memory_current_bytes: Process cgroupmemory.currentin bytes.memory_anon_bytes: Process cgroupmemory.statfieldanon.files_dir_free_bytes: Free bytes on the filesystem that holds$BOOKCLERK_FILES_DIR.scratch_bytes: Byte size of the acquire scratch tree under the download cache.target: Bookclerk artifact target of the reporting binary (linux-x64-gnu, …).labels_json: JSON array of operator-assigned placement labels.kind:owner(shares the database andmaster.key) orhost(its own database, enrolled to contribute).owner_user_id: User who owns this node and may administer it, when one is assigned.share_books: For a branch (branch node): "Share this branch's books with library" as the branch last reported it (catalog.begin); empty until then.include_branches: For a branch: "Include books from my own branches", as reported.catalog_fence: The branch's catalog fence;catalog.*frames under another are lost.catalog_cursor: Cursor the branch's catalog sync resumes after.catalog_pass_started_at: RFC 3339 start of the branch's current full catalog pass.catalog_synced_at: RFC 3339 time of the branch's last accepted catalog batch.catalog_full_pass_at: RFC 3339 end of the branch's last completed full catalog pass.acquire_members_books: For a branch: this library's "Acquire all of this branch's members' books" (1 = on), set by its operator. While on, the branch's catalog sync also sends the books its members acquired that it lists to this library (catalog.session.members_books).
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>
pub struct ColumnIter {
/* private fields */
}
An iterator over the variants of Column
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct Entity;
Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic
pub struct PrimaryKeyIter {
/* private fields */
}
An iterator over the variants of PrimaryKey
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct ActiveModel {
pub node_id: ActiveValue<String>,
pub library_id: ActiveValue<String>,
pub created_at: ActiveValue<String>,
pub incarnation: ActiveValue<String>,
pub heartbeat_at: ActiveValue<String>,
pub software_version: ActiveValue<String>,
pub schema_state: ActiveValue<String>,
pub compatible: ActiveValue<i64>,
pub logical_cpus: ActiveValue<Option<i64>>,
pub cpu_max_quota_us: ActiveValue<Option<i64>>,
pub cpu_max_period_us: ActiveValue<Option<i64>>,
pub memory_max_bytes: ActiveValue<Option<i64>>,
pub memory_current_bytes: ActiveValue<Option<i64>>,
pub memory_anon_bytes: ActiveValue<Option<i64>>,
pub files_dir_free_bytes: ActiveValue<Option<i64>>,
pub scratch_bytes: ActiveValue<Option<i64>>,
pub target: ActiveValue<String>,
pub labels_json: ActiveValue<String>,
pub kind: ActiveValue<String>,
pub owner_user_id: ActiveValue<Option<i64>>,
pub share_books: ActiveValue<Option<i64>>,
pub include_branches: ActiveValue<Option<i64>>,
pub catalog_fence: ActiveValue<i64>,
pub catalog_cursor: ActiveValue<String>,
pub catalog_pass_started_at: ActiveValue<Option<String>>,
pub catalog_synced_at: ActiveValue<Option<String>>,
pub catalog_full_pass_at: ActiveValue<Option<String>>,
pub acquire_members_books: ActiveValue<i64>,
}
Generated by sea-orm-macros
Fields
node_id: Generated by sea-orm-macroslibrary_id: Generated by sea-orm-macroscreated_at: Generated by sea-orm-macrosincarnation: Generated by sea-orm-macrosheartbeat_at: Generated by sea-orm-macrossoftware_version: Generated by sea-orm-macrosschema_state: Generated by sea-orm-macroscompatible: Generated by sea-orm-macroslogical_cpus: Generated by sea-orm-macroscpu_max_quota_us: Generated by sea-orm-macroscpu_max_period_us: Generated by sea-orm-macrosmemory_max_bytes: Generated by sea-orm-macrosmemory_current_bytes: Generated by sea-orm-macrosmemory_anon_bytes: Generated by sea-orm-macrosfiles_dir_free_bytes: Generated by sea-orm-macrosscratch_bytes: Generated by sea-orm-macrostarget: Generated by sea-orm-macroslabels_json: Generated by sea-orm-macroskind: Generated by sea-orm-macrosowner_user_id: Generated by sea-orm-macrosshare_books: Generated by sea-orm-macrosinclude_branches: Generated by sea-orm-macroscatalog_fence: Generated by sea-orm-macroscatalog_cursor: Generated by sea-orm-macroscatalog_pass_started_at: Generated by sea-orm-macroscatalog_synced_at: Generated by sea-orm-macroscatalog_full_pass_at: Generated by sea-orm-macrosacquire_members_books: Generated by sea-orm-macros
Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct RelationIter {
/* private fields */
}
An iterator over the variants of Relation
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub enum Column {
NodeId,
LibraryId,
CreatedAt,
Incarnation,
HeartbeatAt,
SoftwareVersion,
SchemaState,
Compatible,
LogicalCpus,
CpuMaxQuotaUs,
CpuMaxPeriodUs,
MemoryMaxBytes,
MemoryCurrentBytes,
MemoryAnonBytes,
FilesDirFreeBytes,
ScratchBytes,
Target,
LabelsJson,
Kind,
OwnerUserId,
ShareBooks,
IncludeBranches,
CatalogFence,
CatalogCursor,
CatalogPassStartedAt,
CatalogSyncedAt,
CatalogFullPassAt,
AcquireMembersBooks,
}
Generated by sea-orm-macros
Variants
NodeId: Generated by sea-orm-macrosLibraryId: Generated by sea-orm-macrosCreatedAt: Generated by sea-orm-macrosIncarnation: Generated by sea-orm-macrosHeartbeatAt: Generated by sea-orm-macrosSoftwareVersion: Generated by sea-orm-macrosSchemaState: Generated by sea-orm-macrosCompatible: Generated by sea-orm-macrosLogicalCpus: Generated by sea-orm-macrosCpuMaxQuotaUs: Generated by sea-orm-macrosCpuMaxPeriodUs: Generated by sea-orm-macrosMemoryMaxBytes: Generated by sea-orm-macrosMemoryCurrentBytes: Generated by sea-orm-macrosMemoryAnonBytes: Generated by sea-orm-macrosFilesDirFreeBytes: Generated by sea-orm-macrosScratchBytes: Generated by sea-orm-macrosTarget: Generated by sea-orm-macrosLabelsJson: Generated by sea-orm-macrosKind: Generated by sea-orm-macrosOwnerUserId: Generated by sea-orm-macrosShareBooks: Generated by sea-orm-macrosIncludeBranches: Generated by sea-orm-macrosCatalogFence: Generated by sea-orm-macrosCatalogCursor: Generated by sea-orm-macrosCatalogPassStartedAt: Generated by sea-orm-macrosCatalogSyncedAt: Generated by sea-orm-macrosCatalogFullPassAt: Generated by sea-orm-macrosAcquireMembersBooks: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
NodeId,
}
Generated by sea-orm-macros
Variants
NodeId: Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait
pub enum Relation {}
Declared SeaORM relations (nodes are addressed by node_id).
Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait
Generated from crates/bookclerk-library at main · View as Markdown