Package io.microkt.kontainers.domain

Kontainers domain specification.

Types

Link copied to clipboard
class BoundKontainerPort(port: Int, protocol: KontainerPort.Protocol, bindPort: Int) : KontainerPort
Link copied to clipboard
interface DatabaseKontainer : Kontainer
Link copied to clipboard
abstract class GenericKontainer(kontainerSpec: KontainerSpec, delegate: PlatformKontainer) : Kontainer

Provides an abstract Kontainer implementation to handle common Kontainer actions. Delegates to a platform specific parent Kontainer to run the given kontainerSpec.

Link copied to clipboard
open class GenericTcpKontainer(kontainerSpec: KontainerSpec, delegate: PlatformKontainer) : GenericKontainer

Provides a base implementation's GenericKontainer.waitForReady based on TCP socket connectivity to the Kontainer's default TCP port.

Link copied to clipboard
interface JdbcKontainer : DatabaseKontainer

Provides JDBC specific extensions to Kontainer's interface.

Link copied to clipboard
interface Kontainer

Provides a platform-agnostic method for interacting with containers defined by a Kontainer specification.

Link copied to clipboard
interface KontainerFactory<T : Kontainer>

Factory for creating Kontainers of type T.

Link copied to clipboard
open class KontainerPort(port: Int, protocol: KontainerPort.Protocol)

Represents a port number and protocol to be exposed by a Kontainer.

Link copied to clipboard
data class KontainerSpec(name: String, image: String, command: List<String>, environment: Map<String, String>, ports: List<KontainerPort>, resources: KontainerSpecResources)

Provides a platform-agnostic specification for running OCI image based containers across various backends.

Link copied to clipboard
data class KontainerSpecResources(memory: ULong)
Link copied to clipboard
interface PlatformKontainer : Kontainer

Provides an interface to be implemented by Kontainer delegates capable of translating method invocations into vendor platform calls.

Link copied to clipboard
interface R2dbcKontainer : DatabaseKontainer

Functions

Link copied to clipboard
inline fun <T : Kontainer> createKontainer(kontainerSpec: KontainerSpec, delegate: PlatformKontainer): T
Link copied to clipboard
fun Double.toKontainerBytes(multiplier: Long): ULong
fun Int.toKontainerBytes(multiplier: Long): ULong
fun Long.toKontainerBytes(multiplier: Long): ULong

Properties

Link copied to clipboard
val Double.GB: ULong
Link copied to clipboard
val Long.GB: ULong
Link copied to clipboard
val Int.GB: ULong
Link copied to clipboard
const val GIGABYTES: Long = 1073741824
Link copied to clipboard
val Double.MB: ULong
Link copied to clipboard
val Long.MB: ULong
Link copied to clipboard
val Int.MB: ULong
Link copied to clipboard
const val MEGABYTES: Long = 1048576