Struct GCHubRestServerBuilder
pub struct GCHubRestServerBuilder {Show 14 fields
bind_addr: String,
port: u16,
internal_bind_addr: String,
internal_port: u16,
tls_cert_path: Option<PathBuf>,
tls_key_path: Option<PathBuf>,
config_db: GCSharedConfigDatabase,
rt_manager: GCSharedRuntimeManager,
serve_path: Option<PathBuf>,
log_reader_connection: Option<LogReaderConnection>,
ldap_config: Option<LdapConfigBuilder>,
default_user: Option<UserID>,
systemd_runner_enable: bool,
timeseries_pool: Option<PgPool>,
}Expand description
Builds and runs the internal and public HTTP(S) servers
Fields§
§bind_addr: String§port: u16§internal_bind_addr: String§internal_port: u16§tls_cert_path: Option<PathBuf>§tls_key_path: Option<PathBuf>§config_db: GCSharedConfigDatabase§rt_manager: GCSharedRuntimeManager§serve_path: Option<PathBuf>§log_reader_connection: Option<LogReaderConnection>§ldap_config: Option<LdapConfigBuilder>§default_user: Option<UserID>§systemd_runner_enable: bool§timeseries_pool: Option<PgPool>Implementations§
§impl GCHubRestServerBuilder
impl GCHubRestServerBuilder
pub fn new( rt_manager: GCSharedRuntimeManager, config_db: GCSharedConfigDatabase, ) -> Self
pub fn set_port(self, port: u16) -> Self
pub fn set_bind_addr(self, bind_addr: &str) -> Self
pub fn set_internal_bind_addr(self, addr: &str) -> Self
pub fn set_internal_bind_addr(self, addr: &str) -> Self
Sets the bind address for the internal server (default: "127.0.0.1").
pub fn set_internal_port(self, port: u16) -> Self
pub fn set_internal_port(self, port: u16) -> Self
Sets the port for the internal server (default: 3000).
pub fn set_tls(self, cert: PathBuf, key: PathBuf) -> Self
pub fn set_tls(self, cert: PathBuf, key: PathBuf) -> Self
Configures TLS for the public server using explicit PEM certificate and key paths.
pub fn set_timeseries_pool(self, pool: PgPool) -> Self
pub fn set_serve_directory(self, path: PathBuf) -> Self
pub fn set_log_reader_connection(self, conn: LogReaderConnection) -> Self
pub fn set_systemd_runner_enable(self, enabled: bool) -> Self
pub fn set_disable_auth(self, user: UserID) -> Self
pub fn set_disable_auth(self, user: UserID) -> Self
Disables authentication and authorization by injecting a fixed user for all routes.
pub fn set_ldap(self, ldap_auth: LdapConfigBuilder) -> Self
Auto Trait Implementations§
impl !Freeze for GCHubRestServerBuilder
impl !RefUnwindSafe for GCHubRestServerBuilder
impl Send for GCHubRestServerBuilder
impl Sync for GCHubRestServerBuilder
impl Unpin for GCHubRestServerBuilder
impl UnsafeUnpin for GCHubRestServerBuilder
impl !UnwindSafe for GCHubRestServerBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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