| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
TestContainers.Docker.Internal
Synopsis
- data DockerException
- = DockerException { }
- | InspectUnknownContainerId {
- id :: ContainerId
- | InspectOutputInvalidJSON {
- id :: ContainerId
- | InspectOutputMissingNetwork {
- id :: ContainerId
- | InspectOutputUnexpected {
- id :: ContainerId
- | UnknownPortMapping {
- id :: ContainerId
- port :: Text
- type ContainerId = Text
- type InspectOutput = Value
- type NetworkId = Text
- docker :: MonadIO m => Tracer -> [Text] -> m String
- dockerWithStdin :: MonadIO m => Tracer -> [Text] -> Text -> m String
- data Pipe
- type LogConsumer = Pipe -> ByteString -> IO ()
- consoleLogConsumer :: LogConsumer
- dockerFollowLogs :: MonadResource m => Tracer -> ContainerId -> LogConsumer -> m ()
- class WithoutReaper request where
- withoutReaper :: request -> request
Documentation
data DockerException Source #
Failing to interact with Docker results in this exception being thrown.
Since: 0.1.0.0
Constructors
| DockerException | |
| InspectUnknownContainerId | |
Fields
| |
| InspectOutputInvalidJSON | |
Fields
| |
| InspectOutputMissingNetwork | |
Fields
| |
| InspectOutputUnexpected | |
Fields
| |
| UnknownPortMapping | |
Fields
| |
Instances
| Exception DockerException Source # | |
Defined in TestContainers.Docker.Internal Methods toException :: DockerException -> SomeException # | |
| Show DockerException Source # | |
Defined in TestContainers.Docker.Internal Methods showsPrec :: Int -> DockerException -> ShowS # show :: DockerException -> String # showList :: [DockerException] -> ShowS # | |
| Eq DockerException Source # | |
Defined in TestContainers.Docker.Internal Methods (==) :: DockerException -> DockerException -> Bool # (/=) :: DockerException -> DockerException -> Bool # | |
Container related stuff
type ContainerId = Text Source #
Identifies a container within the Docker runtime. Assigned by docker run.
Since: 0.1.0.0
type InspectOutput = Value Source #
The parsed JSON output of docker inspect command.
Since: 0.1.0.0
Network related stuff
type NetworkId = Text Source #
Identifies a network within the Docker runtime. Assigned by docker network create
Since: 0.5.0.0
Running docker
docker :: MonadIO m => Tracer -> [Text] -> m String Source #
Internal function that runs Docker. Takes care of throwing an exception in case of failure.
Since: 0.1.0.0
dockerWithStdin :: MonadIO m => Tracer -> [Text] -> Text -> m String Source #
Internal function that runs Docker. Takes care of throwing an exception in case of failure.
Since: 0.1.0.0
Following logs
A data type indicating which pipe to scan for a specific log line.
Since: 0.1.0.0
type LogConsumer = Pipe -> ByteString -> IO () Source #
An abstraction for forwarding logs.
Since: 0.5.0.0
consoleLogConsumer :: LogConsumer Source #
A simple LogConsumer that writes log lines to stdout and stderr respectively.
Since: 0.5.0.0
dockerFollowLogs :: MonadResource m => Tracer -> ContainerId -> LogConsumer -> m () Source #
Forwards container logs to a LogConsumer. This is equivalent of calling docker logs containerId --follow
Since: 0.5.0.0
Common abstractions for Docker resources
class WithoutReaper request where Source #
Shared property between Docker resources.
Methods
withoutReaper :: request -> request Source #
Do not register the docker resource (container, register, etc.) with the resource reaper. Careful, doing this will make your container leak on shutdown if not explicitly stopped.
Since: 0.5.1.0
Instances
| WithoutReaper ContainerRequest Source # | |
Defined in TestContainers.Docker Methods withoutReaper :: ContainerRequest -> ContainerRequest Source # | |
| WithoutReaper NetworkRequest Source # | |
Defined in TestContainers.Docker.Network Methods | |