-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attach to cluster controller through Networking
This PR includes: - Attachment of PPM to cluster controller now use Networking - PPM observes partition processor status through a buffered watch mechanism - PPM can now send control messages (unused at this PR) to processor for future use. - PPM collects state information from running processors. This will be used in a follow PR to response to controller requests about partitions. Cluster controller grpc service is kept for external tooling integration (CLI, etc.)
- Loading branch information
1 parent
9e861c5
commit 25896ae
Showing
16 changed files
with
463 additions
and
160 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH. | ||
// All rights reserved. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the LICENSE file. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0. | ||
|
||
use restate_types::identifiers::PartitionId; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::common::{KeyRange, RequestId, TargetName}; | ||
use crate::define_rpc; | ||
|
||
define_rpc! { | ||
@request = AttachRequest, | ||
@response = AttachResponse, | ||
@request_target = TargetName::AttachRequest, | ||
@response_target = TargetName::AttachResponse, | ||
} | ||
|
||
#[derive(Debug, Default, Clone, Serialize, Deserialize)] | ||
pub struct AttachRequest { | ||
pub request_id: RequestId, | ||
} | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct AttachResponse { | ||
pub request_id: RequestId, | ||
pub actions: Vec<Action>, | ||
} | ||
|
||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, Eq, PartialEq)] | ||
pub enum RunMode { | ||
Leader, | ||
Follower, | ||
} | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub enum Action { | ||
RunPartition(RunPartition), | ||
} | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct RunPartition { | ||
pub partition_id: PartitionId, | ||
pub key_range_inclusive: KeyRange, | ||
pub mode: RunMode, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.