git.frostfs.info/TrueCloudLab/frostfs-sdk-go@v0.0.0-20241022124111-5361f0ecebd3/client/response.go (about)

     1  package client
     2  
     3  import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
     4  
     5  // ResponseMetaInfo groups meta information about any FrostFS API response.
     6  type ResponseMetaInfo struct {
     7  	key []byte
     8  
     9  	epoch uint64
    10  }
    11  
    12  type responseV2 interface {
    13  	GetMetaHeader() *session.ResponseMetaHeader
    14  	GetVerificationHeader() *session.ResponseVerificationHeader
    15  }
    16  
    17  // ResponderKey returns responder's public key in a binary format.
    18  //
    19  // Result must not be mutated.
    20  func (x ResponseMetaInfo) ResponderKey() []byte {
    21  	return x.key
    22  }
    23  
    24  // Epoch returns local FrostFS epoch of the server.
    25  func (x ResponseMetaInfo) Epoch() uint64 {
    26  	return x.epoch
    27  }