DockerBroker

class DockerBroker(serverConfig: ServerConfig, logger: Logger? = null) : Broker

Implements a Docker based server broker for creating, updating, and removing servers.

Connects to the Docker socket directly

Parameters

serverConfig

Server configuration that should contain a valid DockerServerConfig

Constructors

Link copied to clipboard
constructor(serverConfig: ServerConfig, logger: Logger? = null)

Creates a DockerBroker initialized with the provided configuration

Types

Link copied to clipboard
class ProgressCallback(logger: Logger? = null) : PullImageResultCallback
Link copied to clipboard
class SSLHelper(dockerConfig: DockerServerConfig, logger: Logger? = null)

Functions

Link copied to clipboard
open override fun address(): Result<InetSocketAddress>

Gets the address of the server

Link copied to clipboard
open override fun getStatus(): Status

Gets a Status for the server from the Docker container status

Link copied to clipboard
open override fun isRunning(): Boolean

Returns true if the server is running

Link copied to clipboard
open override fun reconcile(config: ServerConfig): Result<Runnable?>

Creates a closure that can be run to reconcile the server's state with the new configuration.

Link copied to clipboard
open override fun removeServer(): Result<Unit>

Attempts to remove the server

Link copied to clipboard
open override fun startServer(): Result<Unit>

Attempts to start the server if it is not running

Link copied to clipboard
open override fun stopServer(): Result<Unit>

Attempts to stop the server if it is running