Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dagster-pipes-rust] 📝 Sort exports and update docs for public-facing traits #64

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/pipes/implementations/rust/src/context_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use thiserror::Error;

use crate::PipesContextData;

/// Load context data injected by the orchestration process.
pub trait LoadContext {
fn load_context(
&self,
Expand Down
17 changes: 9 additions & 8 deletions libraries/pipes/implementations/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ use serde_json::Map;
use serde_json::Value;
use thiserror::Error;

use crate::context_loader::DefaultLoader as PipesDefaultContextLoader;
use crate::context_loader::{DefaultLoader as PipesDefaultContextLoader, PayloadErrorKind};
use crate::params_loader::{EnvVarLoader as PipesEnvVarParamsLoader, ParamsError};
use crate::types::{Method, PipesContextData, PipesMessage};
use crate::writer::message_writer::{
get_opened_payload, DefaultWriter as PipesDefaultMessageWriter,
};
use crate::writer::message_writer_channel::MessageWriteError;

pub use crate::context_loader::LoadContext;
use crate::context_loader::PayloadErrorKind;
use crate::params_loader::EnvVarLoader as PipesEnvVarParamsLoader;
pub use crate::params_loader::LoadParams;
use crate::params_loader::ParamsError;
pub use crate::types::PipesMetadataValue;
use crate::types::{Method, PipesContextData, PipesMessage};
use crate::writer::message_writer::get_opened_payload;
use crate::writer::message_writer::DefaultWriter as PipesDefaultMessageWriter;
pub use crate::writer::message_writer::{DefaultWriter, MessageWriter};
use crate::writer::message_writer_channel::{MessageWriteError, MessageWriterChannel};
pub use crate::writer::message_writer_channel::MessageWriterChannel;

#[derive(Serialize)]
#[serde(rename_all = "UPPERCASE")]
Expand Down
4 changes: 2 additions & 2 deletions libraries/pipes/implementations/rust/src/params_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const DAGSTER_PIPES_CONTEXT_ENV_VAR: &str = "DAGSTER_PIPES_CONTEXT";
const DAGSTER_PIPES_MESSAGES_ENV_VAR: &str = "DAGSTER_PIPES_MESSAGES";

/// Load params passed from the orchestration process by the context injector and
/// message reader. These params are used to respectively bootstrap
/// [`LoadContext`](crate::LoadContext) and [`PipesMessageWriter`].
/// message reader. These params are used to respectively bootstrap implementations of
/// [`LoadContext`](crate::LoadContext) and [`PipesMessageWriter`](crate::MessageWriter).
pub trait LoadParams {
/// Whether or not this process has been provided with provided with information
/// to create a `PipesContext` or should instead return a mock.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod private {
pub struct Token; // To seal certain trait methods
}

/// Write messages back to Dagster, via its associated [`Self::Channel`].
/// Write messages back to Dagster, via its associated [`MessageWriterChannel`](crate::MessageWriterChannel).
pub trait MessageWriter {
type Channel: MessageWriterChannel;

Expand Down