Skip to content

Commit

Permalink
chore: Switch on missing_docs (#106)
Browse files Browse the repository at this point in the history
Resolves: #29

---------

Signed-off-by: Vaibhav Rabber <[email protected]>
  • Loading branch information
vrongmeal authored Dec 12, 2024
1 parent e263246 commit 87960b9
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 54 deletions.
2 changes: 1 addition & 1 deletion proto
Submodule proto updated 1 files
+40 −1 s2/v1alpha/s2.proto
41 changes: 40 additions & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// This file is @generated by prost-build.
/// List basins request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasinsRequest {
/// List basin names that begin with this prefix.
Expand All @@ -13,6 +14,7 @@ pub struct ListBasinsRequest {
#[prost(uint64, tag = "3")]
pub limit: u64,
}
/// List basins response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasinsResponse {
/// Matching basins.
Expand All @@ -22,7 +24,7 @@ pub struct ListBasinsResponse {
#[prost(bool, tag = "2")]
pub has_more: bool,
}
/// Create a new basin.
/// Create basin request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBasinRequest {
/// Basin name, which must be globally unique. It can be omitted to let the service assign a unique name.
Expand Down Expand Up @@ -50,32 +52,38 @@ pub mod create_basin_request {
Cell(::prost::alloc::string::String),
}
}
/// Create basin response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBasinResponse {
/// Information about the newly created basin.
#[prost(message, optional, tag = "1")]
pub info: ::core::option::Option<BasinInfo>,
}
/// Delete basin request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBasinRequest {
/// Name of the basin to delete.
#[prost(string, tag = "1")]
pub basin: ::prost::alloc::string::String,
}
/// Delete basin response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteBasinResponse {}
/// Get basin configuration request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasinConfigRequest {
/// Basin name.
#[prost(string, tag = "1")]
pub basin: ::prost::alloc::string::String,
}
/// Get basin configuration response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBasinConfigResponse {
/// Basin configuration.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<BasinConfig>,
}
/// Reconfigure basin request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconfigureBasinRequest {
/// Basin name.
Expand All @@ -89,12 +97,14 @@ pub struct ReconfigureBasinRequest {
#[prost(message, optional, tag = "3")]
pub mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Reconfigure basin response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReconfigureBasinResponse {
/// Basin configuration.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<BasinConfig>,
}
/// Stream information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamInfo {
/// Stream name.
Expand All @@ -107,6 +117,7 @@ pub struct StreamInfo {
#[prost(uint32, optional, tag = "3")]
pub deleted_at: ::core::option::Option<u32>,
}
/// List streams request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsRequest {
/// List stream names that begin with this prefix.
Expand All @@ -121,6 +132,7 @@ pub struct ListStreamsRequest {
#[prost(uint64, tag = "3")]
pub limit: u64,
}
/// List streams response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsResponse {
/// Matching streams.
Expand All @@ -130,6 +142,7 @@ pub struct ListStreamsResponse {
#[prost(bool, tag = "2")]
pub has_more: bool,
}
/// Create stream request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamRequest {
/// Stream name, which must be unique within the basin.
Expand All @@ -141,32 +154,38 @@ pub struct CreateStreamRequest {
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<StreamConfig>,
}
/// Create stream response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamResponse {
/// Information about the newly created stream.
#[prost(message, optional, tag = "1")]
pub info: ::core::option::Option<StreamInfo>,
}
/// Delete stream request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteStreamRequest {
/// Stream name.
#[prost(string, tag = "1")]
pub stream: ::prost::alloc::string::String,
}
/// Delete stream response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteStreamResponse {}
/// Get stream configuration request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamConfigRequest {
/// Stream name.
#[prost(string, tag = "1")]
pub stream: ::prost::alloc::string::String,
}
/// Get stream configuration response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetStreamConfigResponse {
/// Stream configuration.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<StreamConfig>,
}
/// Reconfigure stream request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconfigureStreamRequest {
/// Stream name.
Expand All @@ -180,24 +199,28 @@ pub struct ReconfigureStreamRequest {
#[prost(message, optional, tag = "3")]
pub mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Reconfigure stream response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReconfigureStreamResponse {
/// Stream configuration.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<StreamConfig>,
}
/// Check tail request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckTailRequest {
/// Stream name.
#[prost(string, tag = "1")]
pub stream: ::prost::alloc::string::String,
}
/// Check tail response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CheckTailResponse {
/// Sequence number that will be assigned to the next record on the stream.
#[prost(uint64, tag = "1")]
pub next_seq_num: u64,
}
/// Input for append requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendInput {
/// Stream name. Optional for subsequent requests in the session.
Expand All @@ -214,6 +237,7 @@ pub struct AppendInput {
#[prost(bytes = "bytes", optional, tag = "4")]
pub fencing_token: ::core::option::Option<::prost::bytes::Bytes>,
}
/// Output from append response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppendOutput {
/// Sequence number of first record appended.
Expand All @@ -228,30 +252,35 @@ pub struct AppendOutput {
#[prost(uint64, tag = "3")]
pub next_seq_num: u64,
}
/// Append request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendRequest {
/// Request parameters for an append.
#[prost(message, optional, tag = "1")]
pub input: ::core::option::Option<AppendInput>,
}
/// Append response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppendResponse {
/// Response details for an append.
#[prost(message, optional, tag = "1")]
pub output: ::core::option::Option<AppendOutput>,
}
/// Append session request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendSessionRequest {
/// Request parameters for an append.
#[prost(message, optional, tag = "1")]
pub input: ::core::option::Option<AppendInput>,
}
/// Append session response.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AppendSessionResponse {
/// Response details for an append.
#[prost(message, optional, tag = "1")]
pub output: ::core::option::Option<AppendOutput>,
}
/// Output from read response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadOutput {
/// Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
Expand Down Expand Up @@ -279,6 +308,7 @@ pub mod read_output {
NextSeqNum(u64),
}
}
/// Read request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRequest {
/// Stream name.
Expand All @@ -291,6 +321,7 @@ pub struct ReadRequest {
#[prost(message, optional, tag = "3")]
pub limit: ::core::option::Option<ReadLimit>,
}
/// Read response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadResponse {
/// Response details for a read.
Expand All @@ -311,6 +342,7 @@ pub struct ReadLimit {
#[prost(uint64, tag = "2")]
pub bytes: u64,
}
/// Read session request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadSessionRequest {
/// Stream name.
Expand All @@ -326,12 +358,14 @@ pub struct ReadSessionRequest {
#[prost(message, optional, tag = "3")]
pub limit: ::core::option::Option<ReadLimit>,
}
/// Read session response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadSessionResponse {
/// Response details for a read.
#[prost(message, optional, tag = "1")]
pub output: ::core::option::Option<ReadOutput>,
}
/// Stream configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamConfig {
/// Storage class for recent writes. This is the main cost:performance knob in S2.
Expand All @@ -355,12 +389,14 @@ pub mod stream_config {
Age(u64),
}
}
/// / Basin configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BasinConfig {
/// Default stream configuration.
#[prost(message, optional, tag = "1")]
pub default_stream_config: ::core::option::Option<StreamConfig>,
}
/// / Basin information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasinInfo {
/// Basin name.
Expand Down Expand Up @@ -415,12 +451,14 @@ pub struct SequencedRecord {
#[prost(bytes = "bytes", tag = "3")]
pub body: ::prost::bytes::Bytes,
}
/// A batch of sequenced records.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SequencedRecordBatch {
/// Batch of sequenced records.
#[prost(message, repeated, tag = "1")]
pub records: ::prost::alloc::vec::Vec<SequencedRecord>,
}
/// Storage class for recent writes.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StorageClass {
Expand Down Expand Up @@ -453,6 +491,7 @@ impl StorageClass {
}
}
}
/// Current state of the basin.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasinState {
Expand Down
2 changes: 2 additions & 0 deletions src/batching.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Append records batching stream.
use std::{
pin::Pin,
task::{Context, Poll},
Expand Down
Loading

0 comments on commit 87960b9

Please sign in to comment.