2021-11-09 08:07:49 +00:00
|
|
|
package client
|
|
|
|
|
2022-12-13 14:36:35 +00:00
|
|
|
import "github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
2021-11-09 08:07:49 +00:00
|
|
|
|
2022-12-29 10:46:18 +00:00
|
|
|
// ResponseMetaInfo groups meta information about any FrostFS API response.
|
2021-11-09 08:07:49 +00:00
|
|
|
type ResponseMetaInfo struct {
|
|
|
|
key []byte
|
2022-02-17 12:27:49 +00:00
|
|
|
|
|
|
|
epoch uint64
|
2021-11-09 08:07:49 +00:00
|
|
|
}
|
|
|
|
|
2021-11-16 18:17:25 +00:00
|
|
|
type responseV2 interface {
|
|
|
|
GetMetaHeader() *session.ResponseMetaHeader
|
2021-11-09 08:07:49 +00:00
|
|
|
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
|
|
|
|
}
|
2022-02-17 12:27:49 +00:00
|
|
|
|
2022-12-29 10:46:18 +00:00
|
|
|
// Epoch returns local FrostFS epoch of the server.
|
2022-02-17 12:27:49 +00:00
|
|
|
func (x ResponseMetaInfo) Epoch() uint64 {
|
|
|
|
return x.epoch
|
|
|
|
}
|