-
Notifications
You must be signed in to change notification settings - Fork 98
/
datareceivedack.go
40 lines (32 loc) · 1.13 KB
/
datareceivedack.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
package abstractprotocol
import ()
// =======================================================================================================
// DataReceived - This is the interface that Horizon uses to interact with data received messages
// in the agreement protocol.
//
type DataReceivedAck interface {
}
// This struct is the data received message that flows from the consumer to the producer. It indicates
// that the consumer has seen data being received from the workloads on the device.
type BaseDataReceivedAck struct {
*BaseProtocolMessage
}
func (dr *BaseDataReceivedAck) IsValid() bool {
return dr.BaseProtocolMessage.IsValid() && dr.MsgType == MsgTypeDataReceivedAck
}
func (dr *BaseDataReceivedAck) String() string {
return dr.BaseProtocolMessage.String()
}
func (dr *BaseDataReceivedAck) ShortString() string {
return dr.BaseProtocolMessage.ShortString()
}
func NewDataReceivedAck(name string, version int, id string) *BaseDataReceivedAck {
return &BaseDataReceivedAck{
BaseProtocolMessage: &BaseProtocolMessage{
MsgType: MsgTypeDataReceivedAck,
AProtocol: name,
AVersion: version,
AgreeId: id,
},
}
}