pub struct DockerComposeTemplateRenderingService { /* private fields */ }Expand description
Service for rendering Docker Compose templates
This service encapsulates the complex logic for building Docker Compose contexts including:
- Database variant selection (
SQLitevsMySQL) - Topology computation (which services are enabled)
- Optional service configuration (Prometheus, Grafana, Backup, Caddy)
- Grafana environment context
MySQLsetup configuration
Implementations§
Source§impl DockerComposeTemplateRenderingService
impl DockerComposeTemplateRenderingService
Sourcepub fn from_paths(
templates_dir: PathBuf,
build_dir: PathBuf,
clock: Arc<dyn Clock>,
) -> Self
pub fn from_paths( templates_dir: PathBuf, build_dir: PathBuf, clock: Arc<dyn Clock>, ) -> Self
Create a new service with explicit dependencies
§Arguments
templates_dir- Directory containing template source filesbuild_dir- Directory where rendered templates will be writtenclock- Clock service for timestamps
Sourcepub async fn render(
&self,
user_inputs: &UserInputs,
admin_token: &str,
) -> Result<PathBuf, DockerComposeTemplateRenderingServiceError>
pub async fn render( &self, user_inputs: &UserInputs, admin_token: &str, ) -> Result<PathBuf, DockerComposeTemplateRenderingServiceError>
Render Docker Compose templates with full context building
This method builds the complete Docker Compose context from user inputs, including database-specific configuration, topology computation, and optional service integration.
§Arguments
user_inputs- Complete user configurationadmin_token- Tracker admin token
§Returns
Path to the rendered docker-compose build directory
§Errors
Returns error if template rendering fails
Auto Trait Implementations§
impl !RefUnwindSafe for DockerComposeTemplateRenderingService
impl !UnwindSafe for DockerComposeTemplateRenderingService
impl Freeze for DockerComposeTemplateRenderingService
impl Send for DockerComposeTemplateRenderingService
impl Sync for DockerComposeTemplateRenderingService
impl Unpin for DockerComposeTemplateRenderingService
impl UnsafeUnpin for DockerComposeTemplateRenderingService
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request