mirror of
https://github.com/luxfi/netrunner.git
synced 2026-10-30 15:24:46 +00:00
36 lines
631 B
Go
36 lines
631 B
Go
package local
|
|
|
|
import "github.com/luxfi/node/message"
|
|
|
|
var _ message.OutboundMessage = &TestMsg{}
|
|
|
|
type TestMsg struct {
|
|
op message.Op
|
|
bytes []byte
|
|
bypassThrottling bool
|
|
}
|
|
|
|
func NewTestMsg(op message.Op, bytes []byte, bypassThrottling bool) *TestMsg {
|
|
return &TestMsg{
|
|
op: op,
|
|
bytes: bytes,
|
|
bypassThrottling: bypassThrottling,
|
|
}
|
|
}
|
|
|
|
func (m *TestMsg) BypassThrottling() bool {
|
|
return m.bypassThrottling
|
|
}
|
|
|
|
func (m *TestMsg) Op() message.Op {
|
|
return m.op
|
|
}
|
|
|
|
func (m *TestMsg) Bytes() []byte {
|
|
return m.bytes
|
|
}
|
|
|
|
func (*TestMsg) BytesSavedCompression() int {
|
|
return 0
|
|
}
|