Skip to content

Conversation

@andimiller
Copy link
Owner

This adds a new method on DockerClient called getExitLogs which
returns an F[List[ExitedContainer]], you should only evaluate this F
after your Resource has completed, since this is only populated on
container cleanup.

This adds a new method on `DockerClient` called `getExitLogs` which
returns an `F[List[ExitedContainer]]`, you should only evaluate this `F`
after your `Resource` has completed, since this is only populated on
container cleanup.
@nicktelford
Copy link
Collaborator

Is it possible to not pull all the logs as a single String and perhaps use something a little more lazy? What does the Spotify client expose?

@andimiller
Copy link
Owner Author

The spotify client exposes an Iterator<LogMessage> by default, but I need to consume the whole iterator before I delete the docker container, which is what I do to generate the String stored in the ExitedContainer. I could add some kind of callback you can register when you make the DockerImage which would hook this up in realtime, I'm not sure which method is more fiddly to use.

@nicktelford
Copy link
Collaborator

I think a callback might be nicer? Might also be possible to provide a Stream[F, String] and use onFinalize to cleanup the container? The issue with this is that you'd need some way to ensure the Stream terminates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants