forked from influxdata/kapacitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http_out.go
36 lines (33 loc) · 981 Bytes
/
http_out.go
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
package pipeline
// An HTTPOutNode caches the most recent data for each group it has received.
//
// The cached data is available at the given endpoint.
// The endpoint is the relative path from the API endpoint of the running task.
// For example if the task endpoint is at "/api/v1/task/<task_name>" and endpoint is
// "top10", then the data can be requested from "/api/v1/task/<task_name>/top10".
//
// Example:
// stream
// .window()
// .period(10s)
// .every(5s)
// .mapReduce(influxql.top('value', 10))
// //Publish the top 10 results over the last 10s updated every 5s.
// .httpOut('top10')
//
type HTTPOutNode struct {
node
// The relative path where the cached data is exposed
// tick:ignore
Endpoint string
}
func newHTTPOutNode(wants EdgeType, endpoint string) *HTTPOutNode {
return &HTTPOutNode{
node: node{
desc: "http_out",
wants: wants,
provides: NoEdge,
},
Endpoint: endpoint,
}
}