-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split invocation status in invocation status/service status, Change k…
…eying of journal to invocation id (#1169) * Split invocation status in invocation status/service status, Change keying of journal to invocation id * ServiceStatus::Locked now has InvocationId, and not InvocationUuid * Make sure CLI uses the right tables
- Loading branch information
1 parent
2f7669b
commit 230d139
Showing
52 changed files
with
1,789 additions
and
1,450 deletions.
There are no files selected for viewing
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
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,37 @@ | ||
// Copyright (c) 2023 - 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 crate::Result; | ||
use restate_types::identifiers::{InvocationId, ServiceId}; | ||
use std::future::Future; | ||
|
||
#[derive(Debug, Default, Clone, PartialEq)] | ||
pub enum ServiceStatus { | ||
Locked(InvocationId), | ||
#[default] | ||
Unlocked, | ||
} | ||
|
||
pub trait ReadOnlyServiceStatusTable { | ||
fn get_service_status( | ||
&mut self, | ||
service_id: &ServiceId, | ||
) -> impl Future<Output = Result<ServiceStatus>> + Send; | ||
} | ||
|
||
pub trait ServiceStatusTable: ReadOnlyServiceStatusTable { | ||
fn put_service_status( | ||
&mut self, | ||
service_id: &ServiceId, | ||
status: ServiceStatus, | ||
) -> impl Future<Output = ()> + Send; | ||
|
||
fn delete_service_status(&mut self, service_id: &ServiceId) -> impl Future<Output = ()> + Send; | ||
} |
Oops, something went wrong.