Struct wasmcloud_host::HostBuilder [−][src]
pub struct HostBuilder { /* fields omitted */ }
A host builder provides a convenient, fluid syntax for setting initial configuration and tuning parameters for a wasmCloud host
Implementations
impl HostBuilder
[src]
impl HostBuilder
[src]pub fn new() -> HostBuilder
[src]
Creates a new host builder
pub fn enable_live_updates(self) -> HostBuilder
[src]
Indicates that live-updating (hot swapping) of actors at runtime is allowed. The default is to deny
pub fn disable_strict_update_check(self) -> HostBuilder
[src]
Disables strict update checks at runtime. Strict update checks require that the replacement actor’s claims must match exactly the claims of the actor being replaced during update. Strict updates are enabled by default
pub fn with_rpc_client(self, client: Connection) -> HostBuilder
[src]
Build the host with an RPC client by providing an instance of a NATS connection. The presence of an RPC client will automatically enable lattice clustering. RPC is off by default
pub fn with_control_client(self, client: Connection) -> HostBuilder
[src]
Enables remote control of the host via the lattice control protocol by providing an instance of a NATS connection through which control commands flow. Remote control of hosts is disabled by default. For security reasons, you should not use the same NATS connection or security context for both RPC and lattice control.
pub fn with_authorizer(
self,
authorizer: impl Authorizer + 'static
) -> HostBuilder
[src]
self,
authorizer: impl Authorizer + 'static
) -> HostBuilder
Provides an additional layer of runtime security by providing the host with an
instance of an implementor of the Authorizer
trait.
pub fn with_namespace(self, namespace: &str) -> HostBuilder
[src]
When running with lattice enabled, a namespace prefix can be provided to allow
multiple lattices to co-exist within the same account space on a NATS server. This
allows for multi-tenancy but can be a security risk if configured incorrectly. If you do
not supply a namespace, the string default
will be used.
pub fn with_rpc_timeout(self, rpc_timeout: Duration) -> HostBuilder
[src]
Sets the timeout of default RPC invocations across the lattice. This value only carries meaning if an RPC client has been supplied
pub fn with_lattice_cache_provider(self, provider_ref: &str) -> HostBuilder
[src]
Overrides the default lattice cache provider with the key-value capability provider indicated by the OCI image reference. Note that your host must have connectivity to and authorization for the OCI URL provided or the host will not start
pub fn oci_allow_latest(self) -> HostBuilder
[src]
Consulted when a host runtime needs to download an image from an OCI registry,
this option enables the use of images tagged ‘latest’. The default is false
to prevent
accidental mutation of images, close potential attack vectors, and prevent against
inconsistencies when running as part of a distributed system. Also keep in mind that if you
do enable images to run as ‘latest’, it may interfere with live update/hot swap
functionality.
pub fn oci_allow_insecure(self, allowed_insecure: Vec<String>) -> HostBuilder
[src]
Allows the host to pull actor and capability provider images from the supplied list of valid OCI registries without using a secure (SSL/TLS) connection. This option is empty by default and we recommend it not be used in production environments. For local testing, make sure you supply the right host name and port number for the locally running OCI registry.
pub fn with_label(self, key: &str, value: &str) -> HostBuilder
[src]
Adds a custom label and value pair to the host. Label-value pairs are used during
scheduler auctions to determine if a host is compatible with a given scheduling request.
All hosts automatically come with the following built-in system labels: hostcore.arch
,
hostcore.os
, hostcore.osfamily
and you cannot provide your own overridding values
for those.
pub fn build(self) -> Host
[src]
Constructs an instance of a wasmCloud host. Note that this will not start the host. You
will need to invoke the start
function after building a new host.
Trait Implementations
impl Default for HostBuilder
[src]
impl Default for HostBuilder
[src]Auto Trait Implementations
impl !RefUnwindSafe for HostBuilder
impl !RefUnwindSafe for HostBuilder
impl Send for HostBuilder
impl Send for HostBuilder
impl Sync for HostBuilder
impl Sync for HostBuilder
impl Unpin for HostBuilder
impl Unpin for HostBuilder
impl !UnwindSafe for HostBuilder
impl !UnwindSafe for HostBuilder
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,