forked from TrueCloudLab/frostfs-api-go
[#166] v2/netmap: add v2 structures for netmap service
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
fa18f5ede7
commit
a29b615522
8 changed files with 555 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
package netmap
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
)
|
||||
|
||||
type Filter struct {
|
||||
name string
|
||||
key string
|
||||
|
@ -51,6 +56,13 @@ type NodeState uint32
|
|||
// Clause of placement selector.
|
||||
type Clause uint32
|
||||
|
||||
type LocalNodeInfoRequestBody struct{}
|
||||
|
||||
type LocalNodeInfoResponseBody struct {
|
||||
version *refs.Version
|
||||
nodeInfo *NodeInfo
|
||||
}
|
||||
|
||||
const (
|
||||
UnspecifiedState NodeState = iota
|
||||
Online
|
||||
|
@ -389,3 +401,109 @@ func (ni *NodeInfo) SetState(state NodeState) {
|
|||
ni.state = state
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponseBody) GetVersion() *refs.Version {
|
||||
if l != nil {
|
||||
return l.version
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponseBody) SetVersion(version *refs.Version) {
|
||||
if l != nil {
|
||||
l.version = version
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponseBody) GetNodeInfo() *NodeInfo {
|
||||
if l != nil {
|
||||
return l.nodeInfo
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponseBody) SetNodeInfo(nodeInfo *NodeInfo) {
|
||||
if l != nil {
|
||||
l.nodeInfo = nodeInfo
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequestBody {
|
||||
if l != nil {
|
||||
return l.body
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) SetBody(body *LocalNodeInfoRequestBody) {
|
||||
if l != nil {
|
||||
l.body = body
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) GetMetaHeader() *session.RequestMetaHeader {
|
||||
if l != nil {
|
||||
return l.metaHeader
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) SetMetaHeader(metaHeader *session.RequestMetaHeader) {
|
||||
if l != nil {
|
||||
l.metaHeader = metaHeader
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) GetVerificationHeader() *session.RequestVerificationHeader {
|
||||
if l != nil {
|
||||
return l.verifyHeader
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoRequest) SetVerificationHeader(verifyHeader *session.RequestVerificationHeader) {
|
||||
if l != nil {
|
||||
l.verifyHeader = verifyHeader
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponseBody {
|
||||
if l != nil {
|
||||
return l.body
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) SetBody(body *LocalNodeInfoResponseBody) {
|
||||
if l != nil {
|
||||
l.body = body
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) GetMetaHeader() *session.ResponseMetaHeader {
|
||||
if l != nil {
|
||||
return l.metaHeader
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) SetMetaHeader(metaHeader *session.ResponseMetaHeader) {
|
||||
if l != nil {
|
||||
l.metaHeader = metaHeader
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
|
||||
if l != nil {
|
||||
return l.verifyHeader
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LocalNodeInfoResponse) SetVerificationHeader(verifyHeader *session.ResponseVerificationHeader) {
|
||||
if l != nil {
|
||||
l.verifyHeader = verifyHeader
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue