forked from TrueCloudLab/frostfs-api-go
bootstrap: implement SignedDataSource on Request message
This commit is contained in:
parent
3fb293543f
commit
9327c5f816
6 changed files with 226 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
|||
package service
|
||||
|
||||
import "encoding/binary"
|
||||
|
||||
const (
|
||||
_ NodeRole = iota
|
||||
// InnerRingNode that work like IR node.
|
||||
|
@ -19,3 +21,15 @@ func (nt NodeRole) String() string {
|
|||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
func (nt NodeRole) Size() int {
|
||||
return 4
|
||||
}
|
||||
|
||||
func (nt NodeRole) Bytes() []byte {
|
||||
data := make([]byte, nt.Size())
|
||||
|
||||
binary.BigEndian.PutUint32(data, uint32(nt))
|
||||
|
||||
return data
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue