testcontainers_gleam/ceph

Ceph container configuration.

Wraps Testcontainers.CephContainer to provide typed builders for a Ceph container. Use new to create a default configuration, customize with with_* functions, then build to get a Container.

Example

import testcontainers_gleam
import testcontainers_gleam/ceph

let config = ceph.new()
let container = ceph.build(config)
let assert Ok(running) = testcontainers_gleam.start_container(container)
let url = ceph.connection_url(running)

Types

Configuration for a Ceph container.

pub type CephConfig

Values

pub fn build(config: CephConfig) -> container.Container

Build a Container from this Ceph configuration.

pub fn connection_url(container: container.Container) -> String

Get the Ceph connection URL (e.g. "http://localhost:32768/").

pub fn default_image() -> String

Get the default Docker image name (without tag).

pub fn new() -> CephConfig

Create a new Ceph container configuration with defaults.

Default image: quay.io/ceph/demo:latest-quincy, port: 8080, timeout: 300s, access_key: "test".

pub fn port(container: container.Container) -> Int

Get the host-mapped port for the Ceph container.

pub fn with_access_key(
  config: CephConfig,
  access_key: String,
) -> CephConfig

Override the access key (default "test").

pub fn with_bucket(
  config: CephConfig,
  bucket: String,
) -> CephConfig

Set the bucket name.

pub fn with_check_image(
  config: CephConfig,
  pattern: String,
) -> CephConfig

Set the regex pattern to validate the image name.

pub fn with_image(
  config: CephConfig,
  image: String,
) -> CephConfig

Override the Docker image.

pub fn with_port(config: CephConfig, port: Int) -> CephConfig

Override the exposed port (default 8080).

pub fn with_reuse(config: CephConfig, reuse: Bool) -> CephConfig

Enable or disable container reuse across test runs.

pub fn with_secret_key(
  config: CephConfig,
  secret_key: String,
) -> CephConfig

Override the secret key.

pub fn with_wait_timeout(
  config: CephConfig,
  timeout: Int,
) -> CephConfig

Override the wait timeout in milliseconds (default 300000).

Search Document