# bookclerk_library::entities::node_status

SeaORM entity for `node_status`: each node's latest daemon heartbeat.

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | Row shape for this table (`DeriveEntityModel`). |
| [`ColumnIter`](#columniter) | struct | An iterator over the variants of [Column] |
| [`Entity`](#entity) | struct | Generated by sea-orm-macros |
| [`PrimaryKeyIter`](#primarykeyiter) | struct | An iterator over the variants of [PrimaryKey] |
| [`ActiveModel`](#activemodel) | struct | Generated by sea-orm-macros |
| [`RelationIter`](#relationiter) | struct | An iterator over the variants of [Relation] |
| [`Column`](#column) | enum | Generated by sea-orm-macros |
| [`PrimaryKey`](#primarykey) | enum | Generated by sea-orm-macros |
| [`Relation`](#relation) | enum | Declared SeaORM relations (none). |

## Structs

### Model

```rust
pub struct Model {
    pub node_id: String,
    pub incarnation: String,
    pub started_at: String,
    pub heartbeat_at: String,
    pub heartbeat_ms: i64,
    pub interval_ms: i64,
    pub cpu_millicores: i64,
    pub memory_bytes: Option<i64>,
    pub cpu_budget_millicores: i64,
    pub memory_budget_bytes: Option<i64>,
    pub schedulable: i64,
    pub cpu_used_millicores: Option<i64>,
    pub memory_available_bytes: Option<i64>,
    pub files_dir_free_bytes: Option<i64>,
    pub reserved_cpu_millicores: i64,
    pub reserved_memory_bytes: i64,
    pub running_guests: i64,
    pub availability_ppm: i64,
    pub online_since_ms: i64,
    pub cache_bytes: Option<i64>,
    pub cache_budget_bytes: Option<i64>,
    pub cache_swept_ms: Option<i64>,
    pub public_origin: Option<String>,
}
```

Row shape for this table (`DeriveEntityModel`).

**Fields**

- `node_id`: Reporting node.
- `incarnation`: Daemon process incarnation.
- `started_at`: RFC 3339 time the daemon process started.
- `heartbeat_at`: RFC 3339 time of this heartbeat.
- `heartbeat_ms`: Same time in Unix milliseconds (liveness arithmetic).
- `interval_ms`: Heartbeat interval the daemon promised, in milliseconds.
- `cpu_millicores`: Detected CPU capacity in millicores (machine or cgroup, whichever is tighter).
- `memory_bytes`: Detected memory in bytes; empty when unknown.
- `cpu_budget_millicores`: CPU the scheduler may commit here, in millicores.
- `memory_budget_bytes`: Memory the scheduler may commit here; empty when memory is unknown.
- `schedulable`: `1` unless an operator drained the node.
- `cpu_used_millicores`: Measured CPU in use, in millicores; empty until two samples exist.
- `memory_available_bytes`: Measured memory available to new work.
- `files_dir_free_bytes`: Free bytes on the files directory's filesystem.
- `reserved_cpu_millicores`: Sum of running guests' CPU ceilings, in millicores.
- `reserved_memory_bytes`: Sum of running guests' memory ceilings.
- `running_guests`: Guests running on the node.
- `availability_ppm`: Recent online fraction in parts per million.
- `online_since_ms`: Unix milliseconds the current unbroken online stretch began.
- `cache_bytes`: Bytes the node's image caches hold; empty from a node that keeps none.
- `cache_budget_bytes`: Bytes the node's image caches may hold.
- `cache_swept_ms`: Unix milliseconds the node's last cache sweep finished.
- `public_origin`: The public origin a branch reported (`integrations.public_origin`,
  normalized); empty for a branch that reports none and for a shared
  node.

#### Model::into_ex

```rust
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

```rust
pub struct ColumnIter {
    /* private fields */
}
```

An iterator over the variants of [Column](#column)

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

### Entity

```rust
pub struct Entity;
```

Generated by sea-orm-macros

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

### PrimaryKeyIter

```rust
pub struct PrimaryKeyIter {
    /* private fields */
}
```

An iterator over the variants of [PrimaryKey](#primarykey)

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

### ActiveModel

```rust
pub struct ActiveModel {
    pub node_id: ActiveValue<String>,
    pub incarnation: ActiveValue<String>,
    pub started_at: ActiveValue<String>,
    pub heartbeat_at: ActiveValue<String>,
    pub heartbeat_ms: ActiveValue<i64>,
    pub interval_ms: ActiveValue<i64>,
    pub cpu_millicores: ActiveValue<i64>,
    pub memory_bytes: ActiveValue<Option<i64>>,
    pub cpu_budget_millicores: ActiveValue<i64>,
    pub memory_budget_bytes: ActiveValue<Option<i64>>,
    pub schedulable: ActiveValue<i64>,
    pub cpu_used_millicores: ActiveValue<Option<i64>>,
    pub memory_available_bytes: ActiveValue<Option<i64>>,
    pub files_dir_free_bytes: ActiveValue<Option<i64>>,
    pub reserved_cpu_millicores: ActiveValue<i64>,
    pub reserved_memory_bytes: ActiveValue<i64>,
    pub running_guests: ActiveValue<i64>,
    pub availability_ppm: ActiveValue<i64>,
    pub online_since_ms: ActiveValue<i64>,
    pub cache_bytes: ActiveValue<Option<i64>>,
    pub cache_budget_bytes: ActiveValue<Option<i64>>,
    pub cache_swept_ms: ActiveValue<Option<i64>>,
    pub public_origin: ActiveValue<Option<String>>,
}
```

Generated by sea-orm-macros

**Fields**

- `node_id`: Generated by sea-orm-macros
- `incarnation`: Generated by sea-orm-macros
- `started_at`: Generated by sea-orm-macros
- `heartbeat_at`: Generated by sea-orm-macros
- `heartbeat_ms`: Generated by sea-orm-macros
- `interval_ms`: Generated by sea-orm-macros
- `cpu_millicores`: Generated by sea-orm-macros
- `memory_bytes`: Generated by sea-orm-macros
- `cpu_budget_millicores`: Generated by sea-orm-macros
- `memory_budget_bytes`: Generated by sea-orm-macros
- `schedulable`: Generated by sea-orm-macros
- `cpu_used_millicores`: Generated by sea-orm-macros
- `memory_available_bytes`: Generated by sea-orm-macros
- `files_dir_free_bytes`: Generated by sea-orm-macros
- `reserved_cpu_millicores`: Generated by sea-orm-macros
- `reserved_memory_bytes`: Generated by sea-orm-macros
- `running_guests`: Generated by sea-orm-macros
- `availability_ppm`: Generated by sea-orm-macros
- `online_since_ms`: Generated by sea-orm-macros
- `cache_bytes`: Generated by sea-orm-macros
- `cache_budget_bytes`: Generated by sea-orm-macros
- `cache_swept_ms`: Generated by sea-orm-macros
- `public_origin`: Generated by sea-orm-macros

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

### RelationIter

```rust
pub struct RelationIter {
    /* private fields */
}
```

An iterator over the variants of [Relation](#relation)

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

## Enums

### Column

```rust
pub enum Column {
    NodeId,
    Incarnation,
    StartedAt,
    HeartbeatAt,
    HeartbeatMs,
    IntervalMs,
    CpuMillicores,
    MemoryBytes,
    CpuBudgetMillicores,
    MemoryBudgetBytes,
    Schedulable,
    CpuUsedMillicores,
    MemoryAvailableBytes,
    FilesDirFreeBytes,
    ReservedCpuMillicores,
    ReservedMemoryBytes,
    RunningGuests,
    AvailabilityPpm,
    OnlineSinceMs,
    CacheBytes,
    CacheBudgetBytes,
    CacheSweptMs,
    PublicOrigin,
}
```

Generated by sea-orm-macros

**Variants**

- `NodeId`: Generated by sea-orm-macros
- `Incarnation`: Generated by sea-orm-macros
- `StartedAt`: Generated by sea-orm-macros
- `HeartbeatAt`: Generated by sea-orm-macros
- `HeartbeatMs`: Generated by sea-orm-macros
- `IntervalMs`: Generated by sea-orm-macros
- `CpuMillicores`: Generated by sea-orm-macros
- `MemoryBytes`: Generated by sea-orm-macros
- `CpuBudgetMillicores`: Generated by sea-orm-macros
- `MemoryBudgetBytes`: Generated by sea-orm-macros
- `Schedulable`: Generated by sea-orm-macros
- `CpuUsedMillicores`: Generated by sea-orm-macros
- `MemoryAvailableBytes`: Generated by sea-orm-macros
- `FilesDirFreeBytes`: Generated by sea-orm-macros
- `ReservedCpuMillicores`: Generated by sea-orm-macros
- `ReservedMemoryBytes`: Generated by sea-orm-macros
- `RunningGuests`: Generated by sea-orm-macros
- `AvailabilityPpm`: Generated by sea-orm-macros
- `OnlineSinceMs`: Generated by sea-orm-macros
- `CacheBytes`: Generated by sea-orm-macros
- `CacheBudgetBytes`: Generated by sea-orm-macros
- `CacheSweptMs`: Generated by sea-orm-macros
- `PublicOrigin`: Generated by sea-orm-macros

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

### PrimaryKey

```rust
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`

### Relation

```rust
pub enum Relation {}
```

Declared SeaORM relations (none).

Implements: `Clone`, `Copy`, `Debug`, `IntoEnumIterator`, `RelationTrait`
