balancerd

Struct ServiceArgs

Source
pub struct ServiceArgs {
Show 19 fields pub(crate) pgwire_listen_addr: SocketAddr, pub(crate) https_listen_addr: SocketAddr, pub(crate) tls: TlsCliArgs, pub(crate) internal_http_listen_addr: SocketAddr, pub(crate) internal_tls: bool, pub(crate) static_resolver_addr: Option<String>, pub(crate) frontegg_resolver_template: Option<String>, pub(crate) https_resolver_template: String, pub(crate) cancellation_resolver_dir: Option<PathBuf>, pub(crate) frontegg_jwk: Option<String>, pub(crate) frontegg_jwk_file: Option<PathBuf>, pub(crate) frontegg_api_token_url: Option<String>, pub(crate) frontegg_admin_role: Option<String>, pub(crate) launchdarkly_sdk_key: Option<String>, pub(crate) config_sync_timeout: Duration, pub(crate) config_sync_loop_interval: Option<Duration>, pub(crate) cloud_provider: Option<String>, pub(crate) cloud_provider_region: Option<String>, pub(crate) default_config: Option<Vec<(String, String)>>,
}

Fields§

§pgwire_listen_addr: SocketAddr§https_listen_addr: SocketAddr§tls: TlsCliArgs§internal_http_listen_addr: SocketAddr§internal_tls: bool

Whether to initiate internal connections over TLS

§static_resolver_addr: Option<String>

Static pgwire resolver address to use for local testing.

§frontegg_resolver_template: Option<String>

Frontegg resolver address template. {} is replaced with the user’s frontegg tenant id to get a DNS address. The first IP that address resolves to is the proxy destinations.

§https_resolver_template: String

HTTPS resolver address template. {} is replaced with the first subdomain of the HTTPS SNI host address to get a DNS address. The first IP that address resolves to is the proxy destinations.

§cancellation_resolver_dir: Option<PathBuf>

Cancellation resolver configmap directory. The org id part of the incoming connection id (the 12 bits after (and excluding) the first bit) converted to a 3-char UUID string is appended to this to make a file path. That file is read, and every newline-delimited line there is DNS resolved, and all returned IPs get a mirrored cancellation request. The lines in the file must be of the form host:port.

§frontegg_jwk: Option<String>

JWK used to validate JWTs during Frontegg authentication as a PEM public key. Can optionally be base64 encoded with the URL-safe alphabet.

§frontegg_jwk_file: Option<PathBuf>

Path of JWK used to validate JWTs during Frontegg authentication as a PEM public key.

§frontegg_api_token_url: Option<String>

The full URL (including path) to the Frontegg api-token endpoint.

§frontegg_admin_role: Option<String>

The name of the admin role in Frontegg.

§launchdarkly_sdk_key: Option<String>

An SDK key for LaunchDarkly.

Setting this will enable synchronization of LaunchDarkly features.

§config_sync_timeout: Duration

The duration at which the LaunchDarkly synchronization times out during startup.

§config_sync_loop_interval: Option<Duration>

The interval in seconds at which to synchronize LaunchDarkly values.

If this is not explicitly set, the loop that synchronizes LaunchDarkly will not run even if Self::launchdarkly_sdk_key is present (however one initial sync is always run).

§cloud_provider: Option<String>

The cloud provider where the balancer is running.

§cloud_provider_region: Option<String>

The cloud provider region where the balancer is running.

§default_config: Option<Vec<(String, String)>>

Set startup defaults for dynconfig

Trait Implementations§

Source§

impl Args for ServiceArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for ServiceArgs

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for ServiceArgs

Source§

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

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

impl FromArgMatches for ServiceArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for ServiceArgs

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

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, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

fn cast_into(self) -> U

Performs the cast.
Source§

impl<T> CopyAs<T> for T

Source§

fn copy_as(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

Source§

type Error = <Target as OctetsFrom<Source>>::Error

Source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
Source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
Source§

impl<T, U> OverrideFrom<Option<&T>> for U
where U: OverrideFrom<T>,

Source§

fn override_from(self, layer: &Option<&T>) -> U

Override the configuration represented by Self with values from the given layer.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, R> ProtoType<R> for P
where R: RustType<P>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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> Allocation for T
where T: RefUnwindSafe + Send + Sync,