mz_controller_types/lib.rs
1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10//! Shared types for the `mz-controller` crate
11
12pub mod dyncfgs;
13
14/// Identifies a cluster.
15pub type ClusterId = mz_compute_types::ComputeInstanceId;
16
17/// Identifies a cluster replica.
18pub type ReplicaId = mz_cluster_client::ReplicaId;
19
20/// Identifies a watch set.
21#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)]
22pub struct WatchSetId(u64);
23
24impl From<u64> for WatchSetId {
25 fn from(value: u64) -> Self {
26 Self(value)
27 }
28}
29
30pub use mz_compute_types::DEFAULT_COMPUTE_REPLICA_LOGGING_INTERVAL as DEFAULT_REPLICA_LOGGING_INTERVAL;