diff --git a/bootstrap/types.go b/bootstrap/types.go index eacc41e9..7ad3ec26 100644 --- a/bootstrap/types.go +++ b/bootstrap/types.go @@ -122,10 +122,12 @@ func (m *Request) SetInfo(info NodeInfo) { m.Info = info } +// Size returns the size necessary for a binary representation of the state. func (x Request_State) Size() int { return 4 } +// Bytes returns a binary representation of the state. func (x Request_State) Bytes() []byte { data := make([]byte, x.Size()) diff --git a/service/role.go b/service/role.go index 3af09ab6..64a00744 100644 --- a/service/role.go +++ b/service/role.go @@ -22,10 +22,12 @@ func (nt NodeRole) String() string { } } +// Size returns the size necessary for a binary representation of the NodeRole. func (nt NodeRole) Size() int { return 4 } +// Bytes returns a binary representation of the NodeRole. func (nt NodeRole) Bytes() []byte { data := make([]byte, nt.Size())