MCPcopy
hub / github.com/elastic/logstash / Input

Interface Input

logstash-core/src/main/java/co/elastic/logstash/api/Input.java:39–63  ·  view source on GitHub ↗

Logstash Java input interface. Inputs produce events that flow through the Logstash event pipeline. Inputs are flexible and may produce events through many different mechanisms including: a pull mechanism such as periodic queries of external database a push mechanism such

Source from the content-addressed store, hash-verified

37 * Logstash will run as long as any one of its inputs is still producing events.
38 */
39public interface Input extends Plugin {
40
41 /**
42 * Start the input and begin pushing events to the supplied {@link Consumer} instance. If the input produces
43 * an infinite stream of events, this method should loop until a {@link #stop()} request is made. If the
44 * input produces a finite stream of events, this method should terminate when the last event in the stream
45 * is produced.
46 * @param writer Consumer to which events should be pushed
47 */
48 void start(Consumer<Map<String, Object>> writer);
49
50 /**
51 * Notifies the input to stop producing events. Inputs stop both asynchronously and cooperatively. Use the
52 * {@link #awaitStop()} method to block until the input has completed the stop process.
53 */
54 void stop();
55
56 /**
57 * Blocks until the input has stopped producing events. Note that this method should <b>not</b> signal the
58 * input to stop as the {@link #stop()} method does.
59 * @throws InterruptedException On Interrupt
60 */
61 void awaitStop() throws InterruptedException;
62
63}

Callers 14

executeMethod · 0.65
setupMethod · 0.65
isRootMethod · 0.65
stopAndGetMethod · 0.65
tearDownMethod · 0.65
doStopMethod · 0.65

Implementers 3

MockInputPluginlogstash-core/src/test/java/org/logsta
Stdinlogstash-core/src/main/java/org/logsta
Generatorlogstash-core/src/main/java/org/logsta

Calls

no outgoing calls

Tested by

no test coverage detected