forked from mwiede/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogContainerCmd.java
More file actions
82 lines (60 loc) · 2.32 KB
/
Copy pathLogContainerCmd.java
File metadata and controls
82 lines (60 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package com.github.dockerjava.api.command;
import java.io.InputStream;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.async.ResultCallback;
import com.github.dockerjava.api.model.Frame;
/**
* Get container logs
*
* @param followStream
* - true or false, return stream. Defaults to false.
* @param stdout
* - true or false, includes stdout log. Defaults to false.
* @param stderr
* - true or false, includes stderr log. Defaults to false.
* @param timestamps
* - true or false, if true, print timestamps for every log line. Defaults to false.
* @param tail
* - `all` or `<number>`, Output specified number of lines at the end of logs
* @param since
* - UNIX timestamp (integer) to filter logs. Specifying a timestamp will only output log-entries since that timestamp. Default:
* 0 (unfiltered)
*/
public interface LogContainerCmd extends AsyncDockerCmd<LogContainerCmd, Frame> {
@CheckForNull
String getContainerId();
@CheckForNull
Integer getTail();
@CheckForNull
Boolean hasFollowStreamEnabled();
@CheckForNull
Boolean hasTimestampsEnabled();
@CheckForNull
Boolean hasStdoutEnabled();
@CheckForNull
Boolean hasStderrEnabled();
@CheckForNull
Integer getSince();
LogContainerCmd withContainerId(@Nonnull String containerId);
/**
* Following the stream means the resulting {@link InputStream} returned by {@link #exec()} reads infinitely. So a
* {@link InputStream#read()} MAY BLOCK FOREVER as long as no data is streamed from the docker host to {@link DockerClient}!
*/
LogContainerCmd withFollowStream(Boolean followStream);
LogContainerCmd withTimestamps(Boolean timestamps);
LogContainerCmd withStdOut(Boolean stdout);
LogContainerCmd withStdErr(Boolean stderr);
LogContainerCmd withTailAll();
LogContainerCmd withTail(Integer tail);
LogContainerCmd withSince(Integer since);
/**
* @throws com.github.dockerjava.api.NotFoundException
* No such container
*/
@Override
<T extends ResultCallback<Frame>> T exec(T resultCallback);
interface Exec extends DockerCmdAsyncExec<LogContainerCmd, Frame> {
}
}