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: StringThe container image to launch
instances: u64Number of instances that need to be spun up for this app
mem: u64Amount of memory your application needs in MB
metrics: Option<Metrics>§needs_token: boolIf 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: boolIf 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: StringThe 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
impl Clone for Application
Source§fn clone(&self) -> Application
fn clone(&self) -> Application
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Application
impl Debug for Application
Source§impl<'de> Deserialize<'de> for Application
impl<'de> Deserialize<'de> for Application
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for Application
impl Display for Application
Source§impl From<&Application> for Application
impl From<&Application> for Application
Source§fn from(value: &Application) -> Self
fn from(value: &Application) -> Self
Source§impl From<Application> for AppCatalogAppResourcesValue
impl From<Application> for AppCatalogAppResourcesValue
Source§fn from(value: Application) -> Self
fn from(value: Application) -> Self
Source§impl PartialEq for Application
impl PartialEq for Application
Source§impl Serialize for Application
impl Serialize for Application
impl StructuralPartialEq for Application
Auto Trait Implementations§
impl Freeze for Application
impl RefUnwindSafe for Application
impl Send for Application
impl Sync for Application
impl Unpin for Application
impl UnwindSafe for Application
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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