Struct Application

Source
pub struct Application {
Show 17 fields pub cpus: f64, pub env: HashMap<String, String>, pub exposed_ports: HashMap<String, PortMapping>, pub health_check: Option<HealthCheck>, pub image: String, pub instances: u64, pub mem: u64, pub metrics: Option<Metrics>, pub needs_token: bool, pub readable_streams: Vec<String>, pub secrets: Vec<ApplicationSecret>, pub single_instance: bool, pub spread_group: Option<String>, pub topics: Vec<String>, pub user: String, pub volumes: HashMap<String, ApplicationVolumes>, pub writable_streams: Vec<String>,
}
Expand description

Application

JSON schema
{
 "examples": [
   {
     "cpus": 0.8008281904610115,
     "env": {
       "key": "env"
     },
     "exposedPorts": {
       "key": {
         "auth": "auth",
         "mode": "mode",
         "paths": [
           {
             "prefix": "prefix"
           },
           {
             "prefix": "prefix"
           }
         ],
         "serviceGroup": "serviceGroup",
         "tls": "auto",
         "vhost": "vhost",
         "whitelist": "whitelist"
       }
     },
     "healthCheck": {
       "path": "/",
       "port": 0,
       "protocol": "http"
     },
     "image": "image",
     "instances": 0,
     "mem": 0,
     "metrics": {
       "path": "/metrics",
       "port": 0
     },
     "needsToken": true,
     "readableStreams": [
       "readableStreams",
       "readableStreams"
     ],
     "secrets": [
       {
         "injections": [
           {
             "key": "injections"
           },
           {
             "key": "injections"
           }
         ],
         "name": "name"
       },
       {
         "injections": [
           {
             "key": "injections"
           },
           {
             "key": "injections"
           }
         ],
         "name": "name"
       }
     ],
     "singleInstance": false,
     "spreadGroup": "spreadGroup",
     "topics": [
       "topics",
       "topics"
     ],
     "user": "user",
     "volumes": {
       "key": {
         "name": "name"
       }
     },
     "writableStreams": [
       "writableStreams",
       "writableStreams"
     ]
   }
 ],
 "type": "object",
 "required": [
   "cpus",
   "image",
   "mem",
   "user"
 ],
 "properties": {
   "cpus": {
     "description": "How many CPUs this application needs (0.5 = 50% of 1 cpu)",
     "type": "number"
   },
   "env": {
     "description": "Environment variables",
     "type": "object",
     "additionalProperties": {
       "type": "string"
     }
   },
   "exposedPorts": {
     "description": "Exposes ports of your application outside the platform",
     "type": "object",
     "additionalProperties": {
       "$ref": "#/components/schemas/PortMapping"
     }
   },
   "healthCheck": {
     "$ref": "#/components/schemas/HealthCheck"
   },
   "image": {
     "description": "The container image to launch",
     "type": "string",
     "format": "docker_repo/tag:version"
   },
   "instances": {
     "description": "Number of instances that need to be spun up for this app",
     "default": 1,
     "type": "integer",
     "minimum": 0.0
   },
   "mem": {
     "description": "Amount of memory your application needs in MB",
     "type": "integer",
     "minimum": 0.0
   },
   "metrics": {
     "$ref": "#/components/schemas/Metrics"
   },
   "needsToken": {
     "description": "If true, the platform will provision a secret token in the `DSH_SECRET_TOKEN` environment variable. This token can be exchanged for a client certificate that can be used for authentication to, amongst others, the Kafka brokers.\n",
     "default": true,
     "type": "boolean"
   },
   "readableStreams": {
     "description": "names of streams to which the application needs read access.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "secrets": {
     "type": "array",
     "items": {
       "$ref": "#/components/schemas/ApplicationSecret"
     }
   },
   "singleInstance": {
     "description": "If true, the platform will ensure that there is always at most one instance of this application running at the same time. This impacts restart and upgrade behavior: A single-instance application will be terminated before a replacement is started, whereas an application that is not single-instance will remain running until its replacement has started and reports healthy. **Note** Applications that define volumes are always implicitly treated as single-instance, even if this flag is not set.",
     "default": false,
     "type": "boolean"
   },
   "spreadGroup": {
     "description": "The spread group - if any - to be used to ensure instances of one or more applications are not scheduled onto the same node.",
     "type": "string"
   },
   "topics": {
     "description": "names of scratch topics to which the application needs access.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "user": {
     "description": "The userid:groupid combination used to start the application container.",
     "type": "string",
     "format": "userid:groupid"
   },
   "volumes": {
     "description": "The volumes to be mounted in the container. The dictionary key is the mount point.",
     "type": "object",
     "additionalProperties": {
       "$ref": "#/components/schemas/Application_volumes"
     }
   },
   "writableStreams": {
     "description": "names of streams to which the application needs write access.",
     "type": "array",
     "items": {
       "type": "string"
     }
   }
 }
}

Fields§

§cpus: f64§env: HashMap<String, String>

Environment variables

§exposed_ports: HashMap<String, PortMapping>

Exposes ports of your application outside the platform

§health_check: Option<HealthCheck>§image: String

The container image to launch

§instances: u64

Number of instances that need to be spun up for this app

§mem: u64

Amount of memory your application needs in MB

§metrics: Option<Metrics>§needs_token: bool

If true, the platform will provision a secret token in the DSH_SECRET_TOKEN environment variable. This token can be exchanged for a client certificate that can be used for authentication to, amongst others, the Kafka brokers.

§readable_streams: Vec<String>

names of streams to which the application needs read access.

§secrets: Vec<ApplicationSecret>§single_instance: bool

If true, the platform will ensure that there is always at most one instance of this application running at the same time. This impacts restart and upgrade behavior: A single-instance application will be terminated before a replacement is started, whereas an application that is not single-instance will remain running until its replacement has started and reports healthy. Note Applications that define volumes are always implicitly treated as single-instance, even if this flag is not set.

§spread_group: Option<String>

The spread group - if any - to be used to ensure instances of one or more applications are not scheduled onto the same node.

§topics: Vec<String>

names of scratch topics to which the application needs access.

§user: String

The userid:groupid combination used to start the application container.

§volumes: HashMap<String, ApplicationVolumes>

The volumes to be mounted in the container. The dictionary key is the mount point.

§writable_streams: Vec<String>

names of streams to which the application needs write access.

Trait Implementations§

Source§

impl Clone for Application

Source§

fn clone(&self) -> Application

Returns a copy 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 Application

Source§

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

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

impl<'de> Deserialize<'de> for Application

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 Display for Application

Source§

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

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

impl From<&Application> for Application

Source§

fn from(value: &Application) -> Self

Converts to this type from the input type.
Source§

impl From<Application> for AppCatalogAppResourcesValue

Source§

fn from(value: Application) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Application

Source§

fn eq(&self, other: &Application) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Application

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
Source§

impl StructuralPartialEq for Application

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T