ledger_models/
fintekkers.models.util.lock.rs

1/// The definition of a partition
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct NodePartition {
5    #[prost(string, tag = "1")]
6    pub object_class: ::prost::alloc::string::String,
7    #[prost(string, tag = "2")]
8    pub version: ::prost::alloc::string::String,
9    /// The unique id that identifies a partition. For example a namespace with two
10    /// partitions may have one partition with value 0, and another with value 1
11    /// Values may not persist over time. If a namespace moves from having two partitions
12    /// to having four may go from {0,1} to {0,1,2,3} depending on the implementation.
13    /// Partitions are an internal Fintekkers concept and should not be exposed to
14    /// clients
15    #[prost(int32, tag = "3")]
16    pub partition: i32,
17    /// A generic concept to allow partitions of different data types. For example,
18    /// 'Portfolio' may have a different partition space versus 'Security'. The natural
19    /// values to use for this would be the object types provided by different services.
20    #[prost(string, tag = "4")]
21    pub namespace: ::prost::alloc::string::String,
22}
23#[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct NodeState {
26    #[prost(string, tag = "1")]
27    pub object_class: ::prost::alloc::string::String,
28    #[prost(string, tag = "2")]
29    pub version: ::prost::alloc::string::String,
30    /// Placeholder, will change
31    #[prost(message, optional, tag = "5")]
32    pub partition: ::core::option::Option<NodePartition>,
33    /// The end point that serves responses for this partition
34    #[prost(message, optional, tag = "6")]
35    pub end_point: ::core::option::Option<super::Endpoint>,
36    /// The last time the node for this partition was seen, meaning the
37    /// latest heartbeat
38    #[prost(message, optional, tag = "7")]
39    pub last_seen: ::core::option::Option<super::LocalTimestampProto>,
40    /// Whether the lock is expired or not (owned by the lock-service)
41    #[prost(bool, tag = "8")]
42    pub is_expired: bool,
43}