forked from TrueCloudLab/frostfs-sdk-go
[#160] client: Support request X-Headers
Add `WithXHeaders` method to all `Client` operations. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6f1c21da31
commit
529c4d1c2a
11 changed files with 142 additions and 43 deletions
|
@ -11,6 +11,8 @@ import (
|
|||
|
||||
// PrmAnnounceLocalTrust groups parameters of AnnounceLocalTrust operation.
|
||||
type PrmAnnounceLocalTrust struct {
|
||||
prmCommonMeta
|
||||
|
||||
epoch uint64
|
||||
|
||||
trusts []reputation.Trust
|
||||
|
@ -84,6 +86,7 @@ func (c *Client) AnnounceLocalTrust(ctx context.Context, prm PrmAnnounceLocalTru
|
|||
)
|
||||
|
||||
c.initCallContext(&cc)
|
||||
cc.meta = prm.prmCommonMeta
|
||||
cc.req = &req
|
||||
cc.statusRes = &res
|
||||
cc.call = func() (responseV2, error) {
|
||||
|
@ -100,6 +103,8 @@ func (c *Client) AnnounceLocalTrust(ctx context.Context, prm PrmAnnounceLocalTru
|
|||
|
||||
// PrmAnnounceIntermediateTrust groups parameters of AnnounceIntermediateTrust operation.
|
||||
type PrmAnnounceIntermediateTrust struct {
|
||||
prmCommonMeta
|
||||
|
||||
epoch uint64
|
||||
|
||||
iter uint32
|
||||
|
@ -176,6 +181,7 @@ func (c *Client) AnnounceIntermediateTrust(ctx context.Context, prm PrmAnnounceI
|
|||
)
|
||||
|
||||
c.initCallContext(&cc)
|
||||
cc.meta = prm.prmCommonMeta
|
||||
cc.req = &req
|
||||
cc.statusRes = &res
|
||||
cc.call = func() (responseV2, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue