wasmcloud_core/lib.rs
1#![forbid(clippy::unwrap_used)]
2
3pub mod logging;
4pub mod nats;
5pub mod tls;
6
7pub mod host;
8pub use host::*;
9
10pub mod link;
11pub use link::*;
12
13pub mod otel;
14pub use otel::*;
15
16#[cfg(feature = "oci")]
17pub mod oci;
18#[cfg(feature = "oci")]
19pub use oci::*;
20
21pub mod par;
22pub use par::*;
23
24pub mod registry;
25pub use registry::*;
26
27pub mod rpc;
28pub use rpc::*;
29
30pub mod secrets;
31
32pub mod wit;
33pub use wit::*;
34
35#[cfg(feature = "http")]
36pub mod http;
37
38#[cfg(feature = "messaging")]
39pub mod messaging;
40
41/// The 1.0 version of the wasmCloud control API, used in topic strings for the control API
42pub const CTL_API_VERSION_1: &str = "v1";
43
44/// Identifier of one or more entities on the lattice used for addressing. May take many forms, such as:
45/// - component public key
46/// - provider public key
47/// - opaque string
48pub type LatticeTarget = String;
49
50/// Identifier of a component which sends invocations on the lattice
51pub type ComponentId = String;
52
53/// Name of a link on the wasmCloud lattice
54pub type LinkName = String;
55
56/// Public key (nkey) of a cluster issuer
57pub type ClusterIssuerKey = String;
58
59/// WIT package for a given operation (ex. `keyvalue` in `wasi:keyvalue/readwrite.get`)
60pub type WitPackage = String;
61
62/// WIT namespace for a given operation (ex. `wasi` in `wasi:keyvalue/readwrite.get`)
63pub type WitNamespace = String;
64
65/// WIT interface for a given operation (ex. `readwrite` in `wasi:keyvalue/readwrite.get`)
66pub type WitInterface = String;
67
68/// A WIT function (ex. `get` in `wasi:keyvalue/readwrite.get`)
69pub type WitFunction = String;
70
71/// The name of a known (possibly pre-created) configuration, normally used when creating
72/// new interface links in order to configure one or both source/target
73pub type KnownConfigName = String;
74
75/// Trait describing types/entities that can be health-checked
76pub trait HealthCheck {
77 // This might not work with codegen and we'll have to impl
78 fn health_request(&self) -> HealthCheckResponse;
79}