Struct shipcat_definitions::structs::kong::Kong[][src]

pub struct Kong {
Show fields pub name: String, pub upstream_url: String, pub internal: bool, pub publiclyAccessible: bool, pub authorization: Option<Authorization>, pub uris: Option<String>, pub hosts: Vec<String>, pub auth: Option<Authentication>, pub strip_uri: bool, pub preserve_host: bool, pub cors: Option<Cors>, pub additional_internal_ips: Vec<String>, pub babylon_auth_header: Option<BabylonAuthHeader>, pub upstream_connect_timeout: Option<u32>, pub upstream_send_timeout: Option<u32>, pub upstream_read_timeout: Option<u32>, pub add_headers: BTreeMap<String, String>, pub upstream_service: Option<String>, pub babylon_request_id: bool, pub w3c_trace_context: bool, pub ip_rate_limits: Option<KongRateLimit>, pub user_rate_limits: Option<KongRateLimit>,
}
Expand description

Kong setup for a service

Fields

name: String

Auto-populated name of service

Set internally, and used for defaults (discards value in manifest) But overrideable for extra_apis in Region::kong.

upstream_url: String

The base target URL that points to your API server.

This URL will be used for proxying requests. For example: https://example.com.

Normal kubernetes value is: raftcat.svc.cluster.local If left blank, this value will be generated with the service name instead of raftcat.

internal: bool

Whether or not to apply the ip whitelisting (?)

publiclyAccessible: bool

Marker for gate to let external traffic in or not

authorization: Option<Authorization>

Authorization for API

uris: Option<String>

Simple path based routing

E.g. /raftcat

hosts: Vec<String>

A comma-separated list of domain names that point to your API.

For example: example.com. At least one of hosts, uris, or methods should be specified

auth: Option<Authentication>strip_uri: bool

When matching an API via one of the uris prefixes, strip that matching prefix from the upstream URI to be requested.

false => application has to listen on the uris parameter (e.g. /raftcat) true => application has to listen on /, but use prefix agnostic urls everywhere.

preserve_host: bool

Preserves host headers to backend service

When matching an API via one of the hosts domain names, make sure the request Host header is forwarded to the upstream service. Kong’s default is false, meaning the upstream Host header will be extracted from the configured upstream_url.

Shipcat assumes a default of true, as the normal use case is to have this enabled.

cors: Option<Cors>

Configuration parameters for Cross Origin Resource Sharing plugin

When set, the plugin is used.

additional_internal_ips: Vec<String>

When internal is set to true, also add allow these ips through

babylon_auth_header: Option<BabylonAuthHeader>

Babyln plugin (Vincent’s) for propagating a core-ruby auth header.

Compatibility layer for old-style core-ruby authorization headers. Deprecated.

upstream_connect_timeout: Option<u32>

The timeout in milliseconds for establishing a connection to your upstream service. Defaults to 6000

upstream_send_timeout: Option<u32>

The timeout in milliseconds between two successive write operations for transmitting a request to your upstream service Defaults to 60000.

upstream_read_timeout: Option<u32>

The timeout in milliseconds between two successive read operations for transmitting a request to your upstream service Defaults to 60000.

add_headers: BTreeMap<String, String>

Extra headers to append to the response from kong after reverse proxying

I.e. the application will receive these extra headers.

add_headers:
  Cache-Control: no-cache, no-store
  Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;
  X-Content-Type-Options: nosniff
  X-Frame-Options: SAMEORIGIN
  X-XSS-Protection: 1; mode=block
upstream_service: Option<String>babylon_request_id: boolw3c_trace_context: boolip_rate_limits: Option<KongRateLimit>user_rate_limits: Option<KongRateLimit>

Trait Implementations

impl Clone for Kong[src]

fn clone(&self) -> Kong[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Kong[src]

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

Formats the value using the given formatter. Read more

impl Default for Kong[src]

fn default() -> Kong[src]

Returns the “default value” for a type. Read more

impl<'de> Deserialize<'de> for Kong where
    Kong: Default
[src]

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

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Kong[src]

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl RefUnwindSafe for Kong

impl Send for Kong

impl Sync for Kong

impl Unpin for Kong

impl UnwindSafe for Kong

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

pub fn vzip(self) -> V[src]

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