frostfs-sdk-go/client/response.go
Pavel Pogodaev d404a1026e
Some checks failed
DCO / DCO (pull_request) Successful in 54s
Tests and linters / Tests (pull_request) Failing after 1m11s
Tests and linters / Lint (pull_request) Successful in 1m35s
[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-08 14:47:47 +03:00

27 lines
638 B
Go

package client
import "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/session"
// ResponseMetaInfo groups meta information about any FrostFS API response.
type ResponseMetaInfo struct {
key []byte
epoch uint64
}
type responseV2 interface {
GetMetaHeader() *session.ResponseMetaHeader
GetVerificationHeader() *session.ResponseVerificationHeader
}
// ResponderKey returns responder's public key in a binary format.
//
// Result must not be mutated.
func (x ResponseMetaInfo) ResponderKey() []byte {
return x.key
}
// Epoch returns local FrostFS epoch of the server.
func (x ResponseMetaInfo) Epoch() uint64 {
return x.epoch
}