Skip to main content

ServiceConfig

Struct ServiceConfig 

Source
pub struct ServiceConfig {
Show 32 fields pub name: String, pub project: Option<String>, pub runtime: RuntimeKind, pub image: Option<String>, pub module: Option<String>, pub replicas: Replicas, pub port: Option<u16>, pub host_port: Option<u16>, pub domain: Option<String>, pub routes: Vec<String>, pub health: Option<String>, pub readiness: Option<ProbeConfig>, pub liveness: Option<ProbeConfig>, pub env: HashMap<String, String>, pub resources: Option<ResourceLimits>, pub volume: Option<VolumeSpec>, pub deploy: Option<DeployStrategy>, pub placement: Option<PlacementConstraint>, pub network: Option<String>, pub aliases: Vec<String>, pub mounts: Vec<String>, pub triggers: Vec<String>, pub assets: Option<String>, pub build: Option<BuildConfig>, pub tls_cert: Option<String>, pub tls_key: Option<String>, pub internal: bool, pub depends_on: Vec<String>, pub cmd: Vec<String>, pub extra_ports: Vec<String>, pub strip_prefix: Option<String>, pub pull_policy: PullPolicy,
}

Fields§

§name: String§project: Option<String>

Project name (set automatically from directory name by load_dir).

§runtime: RuntimeKind§image: Option<String>

Container image (for container runtime).

§module: Option<String>

Wasm module path or OCI reference (for wasm runtime).

§replicas: Replicas§port: Option<u16>

Container port (internal).

§host_port: Option<u16>

Host port to bind (e.g., 443 for edge proxies). If omitted, ephemeral.

§domain: Option<String>

Domain for reverse proxy routing (orca proxy handles TLS).

§routes: Vec<String>

Path routes under the domain (e.g., [“/api/”, “/admin/”]). Default: [“/*”] (catch-all).

§health: Option<String>

Health check path (e.g., “/healthz”). Legacy shorthand for liveness probe.

§readiness: Option<ProbeConfig>

Readiness probe: container must pass before receiving traffic.

§liveness: Option<ProbeConfig>

Liveness probe: container is restarted if this fails.

§env: HashMap<String, String>§resources: Option<ResourceLimits>§volume: Option<VolumeSpec>§deploy: Option<DeployStrategy>§placement: Option<PlacementConstraint>§network: Option<String>

Docker network name. Services with the same network can reach each other. Auto-prefixed with “orca-”. If omitted, derived from service name prefix.

§aliases: Vec<String>

Network aliases (resolvable names within the Docker network).

§mounts: Vec<String>

Host bind mounts (e.g., [“/host/path:/container/path:ro”]).

§triggers: Vec<String>

Wasm triggers: “http:/path”, “cron:expr”, “queue:topic”, “event:pattern”

§assets: Option<String>

Static assets directory (for builtin:static-server Wasm module).

§build: Option<BuildConfig>

Build configuration: clone a repo and build a Docker image from a Dockerfile. When set, image is not required — the built image is used instead.

§tls_cert: Option<String>

Path to PEM certificate file for BYO TLS (skips ACME provisioning).

§tls_key: Option<String>

Path to PEM private key file for BYO TLS.

§internal: bool

Join the shared orca-internal network for cross-service communication.

§depends_on: Vec<String>

Services that must be running before this service starts.

§cmd: Vec<String>

Command to run in the container (overrides image CMD).

§extra_ports: Vec<String>

Extra fixed host:container port bindings (e.g. [“22222:22”]).

§strip_prefix: Option<String>

Prefix to strip from incoming request paths before forwarding to this service. Used with routes to mount a backend under a subpath without exposing that subpath to the backend itself — e.g. routes = ["/admin/*"], strip_prefix = "/admin" sends /admin/users upstream as /users.

§pull_policy: PullPolicy

Image pull policy: auto (default), always, never, if-not-present.

Implementations§

Source§

impl ServiceConfig

Source

pub fn spec_matches(&self, other: &Self) -> bool

Returns true if the deployment-relevant fields of two configs match.

Used by the reconciler to decide whether a running service needs to be recreated. Fields like name, project, replicas are handled separately by the reconciler and are NOT compared here.

Trait Implementations§

Source§

impl Clone for ServiceConfig

Source§

fn clone(&self) -> ServiceConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ServiceConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ServiceConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,