forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventsCmd.java
More file actions
88 lines (71 loc) · 2.02 KB
/
Copy pathEventsCmd.java
File metadata and controls
88 lines (71 loc) · 2.02 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
83
84
85
86
87
88
package com.github.dockerjava.api.command;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import javax.annotation.CheckForNull;
import com.github.dockerjava.api.model.Event;
import com.github.dockerjava.api.model.EventType;
/**
* Get events
*/
public interface EventsCmd extends AsyncDockerCmd<EventsCmd, Event> {
@CheckForNull
Map<String, List<String>> getFilters();
@CheckForNull
String getSince();
@CheckForNull
String getUntil();
/**
* @param container
* - container to filter
*/
EventsCmd withContainerFilter(String... container);
/**
* @param event
* - event to filter (pull | create | attach | start | stop | kill)
*/
EventsCmd withEventFilter(String... event);
/**
* @param eventTypes event types to filter
*/
EventsCmd withEventTypeFilter(String... eventTypes);
/**
* This provides a type safe version of {@link #withEventTypeFilter(String...)}.
*
* @param eventTypes event types to filter
*/
default EventsCmd withEventTypeFilter(EventType... eventTypes) {
return withEventTypeFilter(
Stream.of(eventTypes)
.map(EventType::getValue)
.toArray(String[]::new)
);
}
/**
* @param image
* - image to filter
*/
EventsCmd withImageFilter(String... image);
/**
* @param label
* - label to filter
*/
EventsCmd withLabelFilter(String... label);
/**
* @param labels
* - labels to filter (map of names and values)
*/
EventsCmd withLabelFilter(Map<String, String> labels);
/**
* @param since
* - Show all events created since timestamp
*/
EventsCmd withSince(String since);
/**
* @param until
* - Show all events created until timestamp
*/
EventsCmd withUntil(String until);
interface Exec extends DockerCmdAsyncExec<EventsCmd, Event> {
}
}