Enum sozu_command_lib::proto::command::request::RequestType

source ·
pub enum RequestType {
Show 42 variants SaveState(String), LoadState(String), ListWorkers(ListWorkers), ListFrontends(FrontendFilters), ListListeners(ListListeners), LaunchWorker(String), UpgradeMain(UpgradeMain), UpgradeWorker(u32), SubscribeEvents(SubscribeEvents), ReloadConfiguration(String), Status(Status), AddCluster(Cluster), RemoveCluster(String), AddHttpFrontend(RequestHttpFrontend), RemoveHttpFrontend(RequestHttpFrontend), AddHttpsFrontend(RequestHttpFrontend), RemoveHttpsFrontend(RequestHttpFrontend), AddCertificate(AddCertificate), ReplaceCertificate(ReplaceCertificate), RemoveCertificate(RemoveCertificate), AddTcpFrontend(RequestTcpFrontend), RemoveTcpFrontend(RequestTcpFrontend), AddBackend(AddBackend), RemoveBackend(RemoveBackend), AddHttpListener(HttpListenerConfig), AddHttpsListener(HttpsListenerConfig), AddTcpListener(TcpListenerConfig), RemoveListener(RemoveListener), ActivateListener(ActivateListener), DeactivateListener(DeactivateListener), QueryClusterById(String), QueryClustersByDomain(QueryClusterByDomain), QueryClustersHashes(QueryClustersHashes), QueryMetrics(QueryMetricsOptions), SoftStop(SoftStop), HardStop(HardStop), ConfigureMetrics(i32), Logging(String), ReturnListenSockets(ReturnListenSockets), QueryCertificatesFromTheState(QueryCertificatesFilters), QueryCertificatesFromWorkers(QueryCertificatesFilters), CountRequests(CountRequests),
}

Variants§

§

SaveState(String)

This message tells Sōzu to dump the current proxy state (backends, front domains, certificates, etc) as a list of JSON-serialized Requests, separated by a 0 byte, to a file. This file can be used later to bootstrap the proxy. This message is not forwarded to workers. If the specified path is relative, it will be calculated relative to the current working directory of the proxy.

§

LoadState(String)

load a state file, given its path

§

ListWorkers(ListWorkers)

list the workers and their status

§

ListFrontends(FrontendFilters)

list the frontends, filtered by protocol and/or domain

§

ListListeners(ListListeners)

list all listeners

§

LaunchWorker(String)

launch a new worker never implemented, the tag is unused and probably not needed we may still implement it later with no paramater the main process will automatically assign a new id to a new worker

§

UpgradeMain(UpgradeMain)

upgrade the main process

§

UpgradeWorker(u32)

upgrade an existing worker, giving its id

§

SubscribeEvents(SubscribeEvents)

subscribe to proxy events

§

ReloadConfiguration(String)

reload the configuration from the config file, or a new file CHECK: this used to be an option. None => use the config file, Some(string) => path_to_file make sure it works using “” and “path_to_file”

§

Status(Status)

give status of main process and all workers

§

AddCluster(Cluster)

add a cluster

§

RemoveCluster(String)

remove a cluster giving its id

§

AddHttpFrontend(RequestHttpFrontend)

add an HTTP frontend

§

RemoveHttpFrontend(RequestHttpFrontend)

remove an HTTP frontend

§

AddHttpsFrontend(RequestHttpFrontend)

add an HTTPS frontend

§

RemoveHttpsFrontend(RequestHttpFrontend)

remove an HTTPS frontend

§

AddCertificate(AddCertificate)

add a certificate

§

ReplaceCertificate(ReplaceCertificate)

replace a certificate

§

RemoveCertificate(RemoveCertificate)

remove a certificate

§

AddTcpFrontend(RequestTcpFrontend)

add a TCP frontend

§

RemoveTcpFrontend(RequestTcpFrontend)

remove a TCP frontend

§

AddBackend(AddBackend)

add a backend

§

RemoveBackend(RemoveBackend)

remove a backend

§

AddHttpListener(HttpListenerConfig)

add an HTTP listener

§

AddHttpsListener(HttpsListenerConfig)

add an HTTPS listener

§

AddTcpListener(TcpListenerConfig)

add a TCP listener

§

RemoveListener(RemoveListener)

remove a listener

§

ActivateListener(ActivateListener)

activate a listener

§

DeactivateListener(DeactivateListener)

deactivate a listener

§

QueryClusterById(String)

query a cluster by id

§

QueryClustersByDomain(QueryClusterByDomain)

query clusters with a hostname and optional path

§

QueryClustersHashes(QueryClustersHashes)

query clusters hashes

§

QueryMetrics(QueryMetricsOptions)

query metrics

§

SoftStop(SoftStop)

soft stop

§

HardStop(HardStop)

hard stop

§

ConfigureMetrics(i32)

enable, disable or clear the metrics

§

Logging(String)

Change the logging level

§

ReturnListenSockets(ReturnListenSockets)

Return the listen sockets

§

QueryCertificatesFromTheState(QueryCertificatesFilters)

Get certificates from the state (rather than from the workers)

§

QueryCertificatesFromWorkers(QueryCertificatesFilters)

Get certificates from the workers (rather than from the state)

§

CountRequests(CountRequests)

query the state about how many requests of each type has been received since startup

Implementations§

source§

impl RequestType

source

pub fn encode<B>(&self, buf: &mut B)
where B: BufMut,

Encodes the message to a buffer.

source

pub fn merge<B>( field: &mut Option<RequestType>, tag: u32, wire_type: WireType, buf: &mut B, ctx: DecodeContext ) -> Result<(), DecodeError>
where B: Buf,

Decodes an instance of the message from a buffer, and merges it into self.

source

pub fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.

Trait Implementations§

source§

impl Clone for RequestType

source§

fn clone(&self) -> RequestType

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 RequestType

source§

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

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

impl<'de> Deserialize<'de> for RequestType

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 From<RequestType> for Request

source§

fn from(value: RequestType) -> Self

Converts to this type from the input type.
source§

impl Hash for RequestType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for RequestType

source§

fn cmp(&self, other: &RequestType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for RequestType

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for RequestType

source§

fn partial_cmp(&self, other: &RequestType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for RequestType

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 Eq for RequestType

source§

impl StructuralPartialEq for RequestType

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

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