use-docker-healthcheck 0.0.1

Primitive Docker healthcheck helpers for RustUse
Documentation
  • Coverage
  • 100%
    21 out of 21 items documented1 out of 15 items with examples
  • Size
  • Source code size: 10.12 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 570.64 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-docker
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-docker-healthcheck

Primitive Docker healthcheck helpers for RustUse.

This crate models healthcheck commands and timing options. It renders Dockerfile-like fragments and never executes commands.

Basic Usage

use use_docker_healthcheck::{DurationSpec, HealthcheckCommand, HealthcheckConfig};

let config = HealthcheckConfig::new(HealthcheckCommand::shell("curl -f http://localhost"))
    .with_interval(DurationSpec::new("30s")?)
    .with_retries(3);

assert_eq!(config.to_string(), "--interval=30s --retries=3 CMD-SHELL curl -f http://localhost");
# Ok::<(), Box<dyn std::error::Error>>(())