Skip to main content

harmos_runtime/operations/
mod.rs

1/* ***
2 *
3 * Harmos
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * ***
8 */
9
10/* === Modules === */
11
12mod admission;
13mod authored;
14pub mod authorization;
15mod binding;
16mod caller;
17#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
18mod catalog;
19pub(crate) mod context;
20mod surface;
21
22#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
23pub(crate) mod children;
24
25#[cfg(all(feature = "plugin-guest", not(target_arch = "wasm32")))]
26mod component;
27mod execution;
28mod finalization;
29#[cfg(feature = "grpc")]
30mod grpc;
31mod handler;
32pub(crate) mod instances;
33mod invocation;
34pub(crate) mod lane;
35mod manager;
36pub mod middleware;
37pub(crate) mod refusal;
38pub mod resident;
39pub(crate) mod scope;
40mod session;
41mod streaming;
42
43#[cfg(feature = "plugin-sidecar")]
44mod native;
45mod registration;
46#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
47mod remote;
48
49#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
50mod sdk;
51mod wire;
52
53/* === Re-Exports === */
54
55pub use crate::supervision::instance::{Outcome as OperationOutcome, Phase as OperationPhase, Status as OperationStatus};
56#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
57pub use caller::Caller;
58#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
59pub use catalog::Binding;
60pub use context::ContextMut;
61#[cfg(feature = "grpc")]
62pub use grpc::GrpcBinding;
63#[cfg(feature = "grpc")]
64pub use grpc::GrpcMethod;
65pub use harmos_sdk::operations::{
66    Backoff, CHILD_METHOD, CacheKey, CacheKeyError, CallValue, Callees, Codec, ContextError, ContextValue, Contract, ContractError,
67    Contracts, Declarations, Dependent, Direction, Entry, Executable, FailureKind, Grpc, InvocationError, Invokes, Jitter,
68    MAX_CACHE_KEY_BYTES, NoStream, Operation, OperationDeclaration, OperationDefinition, OperationPolicy, PORTABLE_BYTES, PORTABLE_VALUES,
69    PolicyError, ReplaySafety, Requires, Resource, RestartPolicy, RetryPolicy, ServingError, Stream, Visibility, WIRE_METHOD, WireAnswer,
70    WireChild, WireChildAction, WireChildCall, WireChildControl, WireCodecError, WireCommand, WireDeclaration, WireEndpoints,
71    WireStreamLimits, WireStreams, WireTable, item_types,
72};
73pub use harmos_sdk::operations::{CallContext, Host, Instance, RequestClaims, Response, instance};
74pub use lane::{Capacity, Lane, LaneSet};
75#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
76pub use remote::{RemoteStreamError, StreamEndpoints, StreamPeer};
77pub use scope::Scope;
78pub use surface::Invocation;
79
80pub use crate::config::OperationSettings as Settings;
81#[cfg(all(feature = "plugin-guest", not(target_arch = "wasm32")))]
82pub use component::{Component, ComponentBindings, ComponentError, ComponentOperation};
83pub use handler::{Context, HostContext, OperationGeneration, OperationInstanceId, Running};
84pub use harmos_domain::observers;
85pub use harmos_sdk::operations::StreamError;
86pub use harmos_sdk::operations::{EndpointSet, InputEndpoint, OutputEndpoint};
87pub(crate) use manager::Manager;
88pub use manager::OperationManager;
89#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
90pub(crate) use manager::WeakOperationManager;
91pub use session::{Completion, Download, Exchange, Session, SessionInput, SessionOutput, Upload};
92pub use streaming::{StreamInput, StreamItem, StreamOutput, StreamPermit, StreamSettings, stream};
93
94#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
95pub(crate) use manager::Registry;
96
97#[cfg(feature = "plugin-sidecar")]
98pub use native::{Native, NativeBindings, NativeError, NativeOperation};
99#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
100pub use registration::Bindings;
101pub(crate) use registration::CatalogBinding;
102pub use registration::{Registration, RegistrationExt};
103
104#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
105pub use registration::PluginRegistration;
106
107#[cfg(any(feature = "plugin-sidecar", all(feature = "plugin-guest", not(target_arch = "wasm32"))))]
108pub use sdk::PluginSdkRegistration;
109pub use wire::EncodedInvocation;
110
111#[cfg(any(feature = "plugin", feature = "plugin-guest", feature = "plugin-sidecar"))]
112pub use wire::PluginCallback;
113
114#[cfg(feature = "plugin-sidecar")]
115pub(crate) use wire::PluginControl;
116
117/* === Imports === */
118
119// Standard Library Imports
120
121// Third Party Imports
122
123// Local Imports
124
125/* === Constants === */
126
127/* === Macros === */
128
129/* === Type Aliases === */
130
131/* === Structs === */
132
133/* === Enums === */
134
135/* === Traits === */
136
137/* === Implementations === */
138
139/* === Public Functions === */
140
141/* === Private Functions === */
142
143/* === Tests === */