forked from TrueCloudLab/frostfs-api
service: support extended headers of the request
This commit is contained in:
parent
e65752699f
commit
f059c49dec
2 changed files with 43 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
||||||
- [service/meta.proto](#service/meta.proto)
|
- [service/meta.proto](#service/meta.proto)
|
||||||
|
|
||||||
- Messages
|
- Messages
|
||||||
|
- [RequestExtendedHeader](#service.RequestExtendedHeader)
|
||||||
|
- [RequestExtendedHeader.KV](#service.RequestExtendedHeader.KV)
|
||||||
- [RequestMetaHeader](#service.RequestMetaHeader)
|
- [RequestMetaHeader](#service.RequestMetaHeader)
|
||||||
- [ResponseMetaHeader](#service.ResponseMetaHeader)
|
- [ResponseMetaHeader](#service.ResponseMetaHeader)
|
||||||
|
|
||||||
|
@ -33,6 +35,29 @@
|
||||||
<!-- end services -->
|
<!-- end services -->
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestExtendedHeader"></a>
|
||||||
|
|
||||||
|
### Message RequestExtendedHeader
|
||||||
|
RequestExtendedHeader contains extended headers of request
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Headers | [RequestExtendedHeader.KV](#service.RequestExtendedHeader.KV) | repeated | Headers carries list of key-value headers |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestExtendedHeader.KV"></a>
|
||||||
|
|
||||||
|
### Message RequestExtendedHeader.KV
|
||||||
|
KV contains string key-value pair
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| K | [string](#string) | | K carries extended header key |
|
||||||
|
| V | [string](#string) | | V carries extra header value |
|
||||||
|
|
||||||
|
|
||||||
<a name="service.RequestMetaHeader"></a>
|
<a name="service.RequestMetaHeader"></a>
|
||||||
|
|
||||||
### Message RequestMetaHeader
|
### Message RequestMetaHeader
|
||||||
|
@ -46,6 +71,7 @@ RequestMetaHeader contains information about request meta headers
|
||||||
| Epoch | [uint64](#uint64) | | Epoch for user can be empty, because node sets epoch to the actual value |
|
| Epoch | [uint64](#uint64) | | Epoch for user can be empty, because node sets epoch to the actual value |
|
||||||
| Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future |
|
| Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future |
|
||||||
| Raw | [bool](#bool) | | Raw determines whether the request is raw or not |
|
| Raw | [bool](#bool) | | Raw determines whether the request is raw or not |
|
||||||
|
| ExtendedHeader | [RequestExtendedHeader](#service.RequestExtendedHeader) | | ExtendedHeader carries extended headers of the request |
|
||||||
|
|
||||||
|
|
||||||
<a name="service.ResponseMetaHeader"></a>
|
<a name="service.ResponseMetaHeader"></a>
|
||||||
|
|
|
@ -19,6 +19,8 @@ message RequestMetaHeader {
|
||||||
uint32 Version = 3;
|
uint32 Version = 3;
|
||||||
// Raw determines whether the request is raw or not
|
// Raw determines whether the request is raw or not
|
||||||
bool Raw = 4;
|
bool Raw = 4;
|
||||||
|
// ExtendedHeader carries extended headers of the request
|
||||||
|
RequestExtendedHeader ExtendedHeader = 5 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResponseMetaHeader contains meta information based on request processing by server
|
// ResponseMetaHeader contains meta information based on request processing by server
|
||||||
|
@ -30,3 +32,18 @@ message ResponseMetaHeader {
|
||||||
// TODO: not used for now, should be implemented in future
|
// TODO: not used for now, should be implemented in future
|
||||||
uint32 Version = 2;
|
uint32 Version = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RequestExtendedHeader contains extended headers of request
|
||||||
|
message RequestExtendedHeader {
|
||||||
|
// KV contains string key-value pair
|
||||||
|
message KV {
|
||||||
|
// K carries extended header key
|
||||||
|
string K = 1;
|
||||||
|
|
||||||
|
// V carries extended header value
|
||||||
|
string V = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Headers carries list of key-value headers
|
||||||
|
repeated KV Headers = 1 [(gogoproto.nullable) = false];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue