Expand description
Allows defining Components, which can represent one microservice in Arminius. Components can also be combined, letting us host the entire application as a monolith.
Modules§
- error
- Easy error handling types for the Matrix API
- message_
token 🔒 - Types to represent positions for the /messages endpoint
- probes
- Module containing Axum routes and handlers for the observability probe endpoints
- request_
source - Module containing an Axum extractor for extracting IP addresses
- ruma_
requests - Utilities when using ruma. Either they convert between ruma and axum, or they convert between the different representations of the same data that ruma has.
Macros§
- compose_
components - For a list of components
ComponentA,ComponentB,ComponentCconstructs a typeComposedComponent<ComponentA, ComposedComponent<ComponentB, ComponentC>>. - new_
server_ state - Create a new server state while automatically setting the component name on NATS
Structs§
- Arminius
Config - The configuration for an instance of Arminius
- Composed
Component - A component composed of two components. Initializing this component is equivalent to initializing the two components one after the other. Running it is equivalent to running them as a monolith.
- Empty
Component - A component with no endpoints - useful for healthchecks for services that don’t expose their own HTTP endpoints otherwise
- Endpoint
NotFound - Error returned when the user used an unknown endpoint.
- Messages
Token - Token representing position in the
/messagesendpoint - Method
NotAllowed - Error returned when the user used a disallowed method.
- Server
- Represents the “microservice”, which is composed out of one or more components handing specific functions.
- Server
State - The state required for running a component
Enums§
- Component
Initialization Error - Signals an error during component creation / initialization
- Maintenance
Mode Layer Error - Error type for the maintenance mode middleware layer.
- Message
Token Parse Error - Error that occurs when parsing a messages token
Traits§
- Component
- Represents a component in the microservice
Functions§
- await_
shutdown_ signal - Future that completes when a SIGTERM or SIGINT is received, or immediately if no listener can be registered.
- maintenance_
mode_ 🔒layer - Middleware layer that returns a maintenance mode error if the service is currently in maintenance mode.
- method_
not_ 🔒allowed_ endpoint - Always returns METHOD_NOT_ALLOWED. Called as a method_not_allowed_fallback
- unknown_
endpoint 🔒 - Always returns NOT_FOUND. Called as a fallback option