pub struct ProxyServerConfig {
pub bucket_creds_fetcher: Option<Py<PyAny>>,
pub cos_map: PyObject,
pub http_port: Option<u16>,
pub https_port: Option<u16>,
pub validator: Option<Py<PyAny>>,
pub threads: Option<usize>,
pub verify: Option<bool>,
pub hmac_keystore: PyObject,
pub skip_signature_validation: Option<bool>,
pub hmac_fetcher: Option<Py<PyAny>>,
pub max_presign_url_usage_attempts: Option<usize>,
pub server_name: String,
}Expand description
Configuration object for :pyfunc:object_storage_proxy.start_server.
§Parameters
cos_map: A dictionary mapping bucket names to their respective COS configuration. Each entry should contain the following keys:
- host: The COS endpoint (e.g., “s3.eu-de.cloud-object-storage.appdomain.cloud”)
- port: The port number (e.g., 443)
- api_key/apikey: The API key for the bucket (optional)
- ttl/time-to-live: The time-to-live for the API key in seconds (optional)
bucket_creds_fetcher: Optional Python async callable that fetches the API key for a bucket. The callable should accept a single argument, the bucket name. It should return a string containing the API key. http_port: The HTTP port to listen on. https_port: The HTTPS port to listen on. validator: Optional Python async callable that validates the request. The callable should accept two arguments, the token and the bucket name. It should return a boolean indicating whether the request is valid. threads: Optional number of threads to use for the server. If not specified, the server will use a single thread.
Fields§
§bucket_creds_fetcher: Option<Py<PyAny>>§cos_map: PyObject§http_port: Option<u16>§https_port: Option<u16>§validator: Option<Py<PyAny>>§threads: Option<usize>§verify: Option<bool>§hmac_keystore: PyObject§skip_signature_validation: Option<bool>§hmac_fetcher: Option<Py<PyAny>>§max_presign_url_usage_attempts: Option<usize>§server_name: StringImplementations§
Source§impl ProxyServerConfig
impl ProxyServerConfig
pub fn new( cos_map: PyObject, hmac_keystore: Option<PyObject>, bucket_creds_fetcher: Option<PyObject>, http_port: Option<u16>, https_port: Option<u16>, validator: Option<PyObject>, threads: Option<usize>, verify: Option<bool>, skip_signature_validation: Option<bool>, hmac_fetcher: Option<PyObject>, max_presign_url_usage_attempts: Option<usize>, server_name: String, ) -> Self
pub(crate) fn __repr__(&self) -> PyResult<String>
Trait Implementations§
Source§impl Debug for ProxyServerConfig
impl Debug for ProxyServerConfig
Source§impl Default for ProxyServerConfig
impl Default for ProxyServerConfig
Source§impl<'py> IntoPyObject<'py> for ProxyServerConfig
impl<'py> IntoPyObject<'py> for ProxyServerConfig
Source§type Target = ProxyServerConfig
type Target = ProxyServerConfig
Source§type Output = Bound<'py, <ProxyServerConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <ProxyServerConfig as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for ProxyServerConfig
impl PyClass for ProxyServerConfig
Source§impl PyClassImpl for ProxyServerConfig
impl PyClassImpl for ProxyServerConfig
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§type ThreadChecker = SendablePyClass<ProxyServerConfig>
type ThreadChecker = SendablePyClass<ProxyServerConfig>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<ProxyServerConfig> for PyClassImplCollector<ProxyServerConfig>
impl PyClassNewTextSignature<ProxyServerConfig> for PyClassImplCollector<ProxyServerConfig>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a ProxyServerConfig
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a ProxyServerConfig
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut ProxyServerConfig
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut ProxyServerConfig
Source§impl PyMethods<ProxyServerConfig> for PyClassImplCollector<ProxyServerConfig>
impl PyMethods<ProxyServerConfig> for PyClassImplCollector<ProxyServerConfig>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for ProxyServerConfig
impl PyTypeInfo for ProxyServerConfig
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.impl DerefToPyAny for ProxyServerConfig
Auto Trait Implementations§
impl Freeze for ProxyServerConfig
impl !RefUnwindSafe for ProxyServerConfig
impl Send for ProxyServerConfig
impl Sync for ProxyServerConfig
impl Unpin for ProxyServerConfig
impl UnsafeUnpin for ProxyServerConfig
impl UnwindSafe for ProxyServerConfig
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
§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>
§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more