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
impl RequestType
sourcepub fn merge<B>(
field: &mut Option<RequestType>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
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.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for RequestType
impl Clone for RequestType
source§fn clone(&self) -> RequestType
fn clone(&self) -> RequestType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RequestType
impl Debug for RequestType
source§impl<'de> Deserialize<'de> for RequestType
impl<'de> Deserialize<'de> for RequestType
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 From<RequestType> for Request
impl From<RequestType> for Request
source§fn from(value: RequestType) -> Self
fn from(value: RequestType) -> Self
source§impl Hash for RequestType
impl Hash for RequestType
source§impl Ord for RequestType
impl Ord for RequestType
source§fn cmp(&self, other: &RequestType) -> Ordering
fn cmp(&self, other: &RequestType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for RequestType
impl PartialEq for RequestType
source§fn eq(&self, other: &RequestType) -> bool
fn eq(&self, other: &RequestType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RequestType
impl PartialOrd for RequestType
source§fn partial_cmp(&self, other: &RequestType) -> Option<Ordering>
fn partial_cmp(&self, other: &RequestType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for RequestType
impl Serialize for RequestType
impl Eq for RequestType
impl StructuralPartialEq for RequestType
Auto Trait Implementations§
impl Freeze for RequestType
impl RefUnwindSafe for RequestType
impl Send for RequestType
impl Sync for RequestType
impl Unpin for RequestType
impl UnwindSafe for RequestType
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.