-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.go
54 lines (45 loc) · 1.51 KB
/
actions.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package kcl
// A general action
type Action struct {
ActionType string `json:"action"`
}
type InitializeAction struct {
Action
ShardID string `json:"shardId"`
SequenceNumber string `json:"sequenceNumber"`
SubSequenceNumber uint64 `json:"subSequenceNumber"`
}
type ProcessRecordsAction struct {
Action
Records []Record `json:"records"`
MillisBehindLatest uint64 `json:"millisBehindLatest"`
}
type ShutdownAction struct {
Action
Reason string `json:"reason"`
}
type StatusAction struct {
Action
ResponseFor string `json:"responseFor"`
}
type LeastLostAction struct {
Action
}
type CheckpointAction struct {
Action
SequenceNumber *string `json:"sequenceNumber"`
SubSequenceNumber *uint64 `json:"subSequenceNumber"`
Error *string `json:"error"`
}
type ShardEndedAction struct {
Action
}
// Record is an individual kinesis record. Note that the body is always
// base64 encoded.
type Record struct {
DataB64 string `json:"data"`
PartitionKey string `json:"partitionKey"`
SequenceNumber string `json:"sequenceNumber"`
SubSequenceNumber uint64 `json:"subSequenceNumber"`
ApproximateArrivalTimestamp uint64 `json:"approximateArrivalTimestamp"`
}