chore:reva bump v.2.34 (#1139)
This commit is contained in:
+106
-95
@@ -87,6 +87,9 @@ type CreateOCMCoreShareRequest struct {
|
||||
// See also cs3/sharing/ocm/v1beta1/resources.proto for how to map
|
||||
// this to the OCM share payload.
|
||||
Protocols []*v1beta13.Protocol `protobuf:"bytes,11,rep,name=protocols,proto3" json:"protocols,omitempty"`
|
||||
// OPTIONAL.
|
||||
// A nonce to be exchanged for a (potentially short-lived) bearer token.
|
||||
Code string `protobuf:"bytes,12,opt,name=code,proto3" json:"code,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateOCMCoreShareRequest) Reset() {
|
||||
@@ -198,6 +201,13 @@ func (x *CreateOCMCoreShareRequest) GetProtocols() []*v1beta13.Protocol {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateOCMCoreShareRequest) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateOCMCoreShareResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -571,8 +581,8 @@ var file_cs3_ocm_core_v1beta1_ocm_core_api_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x1d, 0x63, 0x73, 0x33, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee,
|
||||
0x04, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65,
|
||||
0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82,
|
||||
0x05, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06,
|
||||
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
@@ -610,102 +620,103 @@ var file_cs3_ocm_core_v1beta1_ocm_core_api_proto_rawDesc = []byte{
|
||||
0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e,
|
||||
0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22,
|
||||
0xc8, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72,
|
||||
0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f,
|
||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71,
|
||||
0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x19, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71,
|
||||
0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43,
|
||||
0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06,
|
||||
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79,
|
||||
0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0xd4,
|
||||
0x02, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06,
|
||||
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x12,
|
||||
0x20, 0x0a, 0x0c, 0x6f, 0x63, 0x6d, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x63, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49,
|
||||
0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x73, 0x68, 0x61,
|
||||
0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65,
|
||||
0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65,
|
||||
0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74,
|
||||
0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61,
|
||||
0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6f,
|
||||
0x63, 0x6d, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x6f, 0x63, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x41, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x3f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x73, 0x22, 0x80, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43,
|
||||
0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70,
|
||||
0x61, 0x71, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x43,
|
||||
0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x32, 0xf7, 0x02, 0x0a, 0x0a,
|
||||
0x4f, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x41, 0x50, 0x49, 0x12, 0x77, 0x0a, 0x12, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x12, 0x2f, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43,
|
||||
0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70,
|
||||
0x61, 0x71, 0x75, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f,
|
||||
0x74, 0x1a, 0x30, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
|
||||
0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52,
|
||||
0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x32, 0xf7, 0x02, 0x0a, 0x0a, 0x4f, 0x63, 0x6d, 0x43,
|
||||
0x6f, 0x72, 0x65, 0x41, 0x50, 0x49, 0x12, 0x77, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2f, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72,
|
||||
0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f,
|
||||
0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x77, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2f, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e,
|
||||
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d,
|
||||
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2f,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43,
|
||||
0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x30, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x43, 0x4d,
|
||||
0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63,
|
||||
0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f,
|
||||
0x4f, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||
0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73,
|
||||
0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f,
|
||||
0x63, 0x73, 0x33, 0x2f, 0x6f, 0x63, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0xa2, 0x02, 0x03, 0x43, 0x4f, 0x43, 0xaa, 0x02, 0x14, 0x43, 0x73, 0x33, 0x2e, 0x4f, 0x63, 0x6d,
|
||||
0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14,
|
||||
0x43, 0x73, 0x33, 0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x73, 0x33, 0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x43,
|
||||
0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x4f,
|
||||
0x63, 0x6d, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d,
|
||||
0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2f, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x12,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x12, 0x2f, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f,
|
||||
0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x4f, 0x43, 0x4d, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xdd, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x42, 0x0f, 0x4f, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61,
|
||||
0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x6f, 0x63, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
|
||||
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x43, 0xaa, 0x02, 0x14, 0x43, 0x73, 0x33,
|
||||
0x2e, 0x4f, 0x63, 0x6d, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0xca, 0x02, 0x14, 0x43, 0x73, 0x33, 0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x43, 0x6f, 0x72, 0x65,
|
||||
0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x73, 0x33, 0x5c, 0x4f,
|
||||
0x63, 0x6d, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43, 0x73,
|
||||
0x33, 0x3a, 0x3a, 0x4f, 0x63, 0x6d, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+6
-6
@@ -47,13 +47,13 @@ const (
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type OcmCoreAPIClient interface {
|
||||
// Creates a new OCM share, in response to a call from remote to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1shares/post
|
||||
CreateOCMCoreShare(ctx context.Context, in *CreateOCMCoreShareRequest, opts ...grpc.CallOption) (*CreateOCMCoreShareResponse, error)
|
||||
// Updates an OCM share, in response to a notification from the remote system to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
UpdateOCMCoreShare(ctx context.Context, in *UpdateOCMCoreShareRequest, opts ...grpc.CallOption) (*UpdateOCMCoreShareResponse, error)
|
||||
// Deletes an OCM share, in response to a notification from the remote system to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
DeleteOCMCoreShare(ctx context.Context, in *DeleteOCMCoreShareRequest, opts ...grpc.CallOption) (*DeleteOCMCoreShareResponse, error)
|
||||
}
|
||||
|
||||
@@ -97,13 +97,13 @@ func (c *ocmCoreAPIClient) DeleteOCMCoreShare(ctx context.Context, in *DeleteOCM
|
||||
// for forward compatibility
|
||||
type OcmCoreAPIServer interface {
|
||||
// Creates a new OCM share, in response to a call from remote to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1shares/post
|
||||
CreateOCMCoreShare(context.Context, *CreateOCMCoreShareRequest) (*CreateOCMCoreShareResponse, error)
|
||||
// Updates an OCM share, in response to a notification from the remote system to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
UpdateOCMCoreShare(context.Context, *UpdateOCMCoreShareRequest) (*UpdateOCMCoreShareResponse, error)
|
||||
// Deletes an OCM share, in response to a notification from the remote system to:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1notifications/post
|
||||
DeleteOCMCoreShare(context.Context, *DeleteOCMCoreShareRequest) (*DeleteOCMCoreShareResponse, error)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ type InviteAPIClient interface {
|
||||
ListInviteTokens(ctx context.Context, in *ListInviteTokensRequest, opts ...grpc.CallOption) (*ListInviteTokensResponse, error)
|
||||
// Forwards a received invite to the remote sync'n'share system provider. The remote
|
||||
// system SHALL get an `invite-accepted` call as follows:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
|
||||
// MUST return CODE_NOT_FOUND if the token does not exist.
|
||||
// MUST return CODE_INVALID_ARGUMENT if the token expired.
|
||||
// MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.
|
||||
@@ -158,7 +158,7 @@ type InviteAPIServer interface {
|
||||
ListInviteTokens(context.Context, *ListInviteTokensRequest) (*ListInviteTokensResponse, error)
|
||||
// Forwards a received invite to the remote sync'n'share system provider. The remote
|
||||
// system SHALL get an `invite-accepted` call as follows:
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
|
||||
// https://cs3org.github.io/OCM-API/docs.html?branch=v1.2.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
|
||||
// MUST return CODE_NOT_FOUND if the token does not exist.
|
||||
// MUST return CODE_INVALID_ARGUMENT if the token expired.
|
||||
// MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.
|
||||
|
||||
Generated
Vendored
+154
-130
@@ -209,9 +209,12 @@ type Share struct {
|
||||
// REQUIRED.
|
||||
// Last modification time of the share.
|
||||
Mtime *v1beta12.Timestamp `protobuf:"bytes,8,opt,name=mtime,proto3" json:"mtime,omitempty"`
|
||||
// Optional.
|
||||
// OPTIONAL.
|
||||
// The expiration time of the share.
|
||||
Expiration *v1beta12.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"`
|
||||
// OPTIONAL.
|
||||
// A user-defined description for the share.
|
||||
Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Share) Reset() {
|
||||
@@ -309,6 +312,13 @@ func (x *Share) GetExpiration() *v1beta12.Timestamp {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Share) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The permissions for a share.
|
||||
type SharePermissions struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -375,9 +385,13 @@ type ReceivedShare struct {
|
||||
// REQUIRED.
|
||||
// The mount point of the share.
|
||||
MountPoint *v1beta1.Reference `protobuf:"bytes,3,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
|
||||
// Optional.
|
||||
// Hide share, default false
|
||||
// OPTIONAL.
|
||||
// Flag to hide the share, defaults to false.
|
||||
Hidden bool `protobuf:"varint,4,opt,name=hidden,proto3" json:"hidden,omitempty"`
|
||||
// OPTIONAL.
|
||||
// An alternate identifier to allow a recipient to rename the share.
|
||||
// If missing, use the original folder name.
|
||||
Alias string `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReceivedShare) Reset() {
|
||||
@@ -440,6 +454,13 @@ func (x *ReceivedShare) GetHidden() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ReceivedShare) GetAlias() string {
|
||||
if x != nil {
|
||||
return x.Alias
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Uniquely identifies a share in the share provider.
|
||||
// A share MUST be uniquely identify by four (4) elements:
|
||||
// 1) The share provider id
|
||||
@@ -894,7 +915,7 @@ var file_cs3_sharing_collaboration_v1beta1_resources_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x1d, 0x63, 0x73, 0x33, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2,
|
||||
0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4,
|
||||
0x04, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
@@ -931,136 +952,139 @@ var file_cs3_sharing_collaboration_v1beta1_resources_proto_rawDesc = []byte{
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf6, 0x01, 0x0a,
|
||||
0x0d, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x3e,
|
||||
0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c,
|
||||
0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x43,
|
||||
0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c,
|
||||
0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74,
|
||||
0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69,
|
||||
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x65,
|
||||
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x0b, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8c,
|
||||
0x02, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x12, 0x3e, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x28, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65,
|
||||
0x12, 0x43, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05,
|
||||
0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
|
||||
0x6e, 0x63, 0x65, 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xcf, 0x01,
|
||||
0x0a, 0x08, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x6f, 0x77,
|
||||
0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x05, 0x6f, 0x77,
|
||||
0x6e, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68,
|
||||
0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b,
|
||||
0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3f,
|
||||
0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47,
|
||||
0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22,
|
||||
0x26, 0x0a, 0x07, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x70,
|
||||
0x61, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f,
|
||||
0x70, 0x61, 0x71, 0x75, 0x65, 0x49, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x53, 0x68, 0x61, 0x72,
|
||||
0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x49, 0x64, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72,
|
||||
0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b,
|
||||
0x65, 0x79, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65,
|
||||
0x63, 0x22, 0xe2, 0x01, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x65, 0x12, 0x55, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x83, 0x05, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65,
|
||||
0x72, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x2e, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x49, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x49, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73,
|
||||
0x65, 0x72, 0x49, 0x64, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0b, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x28, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07,
|
||||
0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x26, 0x0a, 0x07, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x49, 0x64, 0x22,
|
||||
0x97, 0x01, 0x0a, 0x0e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x12, 0x3c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c,
|
||||
0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x3f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c,
|
||||
0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xe2, 0x01, 0x0a, 0x0a, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e,
|
||||
0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65,
|
||||
0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c,
|
||||
0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x83,
|
||||
0x05, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74,
|
||||
0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a,
|
||||
0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||
0x65, 0x72, 0x49, 0x64, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a,
|
||||
0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x48, 0x00, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x0c,
|
||||
0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x48, 0x00, 0x52, 0x0a,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x6f, 0x77,
|
||||
0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x48, 0x00, 0x52, 0x05,
|
||||
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x48, 0x00, 0x52, 0x07, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x5f,
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49,
|
||||
0x64, 0x12, 0x45, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63,
|
||||
0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48,
|
||||
0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
|
||||
0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43,
|
||||
0x45, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f,
|
||||
0x57, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43,
|
||||
0x52, 0x45, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x45, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, 0x12,
|
||||
0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f,
|
||||
0x44, 0x45, 0x4e, 0x49, 0x41, 0x4c, 0x53, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a,
|
||||
0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x08, 0x42, 0x06, 0x0a, 0x04,
|
||||
0x74, 0x65, 0x72, 0x6d, 0x2a, 0x72, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54,
|
||||
0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53,
|
||||
0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49,
|
||||
0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54,
|
||||
0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18,
|
||||
0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45,
|
||||
0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x42, 0xb3, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c,
|
||||
0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70,
|
||||
0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x63,
|
||||
0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x43, 0xaa,
|
||||
0x02, 0x21, 0x43, 0x73, 0x33, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c,
|
||||
0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52,
|
||||
0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x08,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61,
|
||||
0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||
0x22, 0xb1, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54,
|
||||
0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x0e,
|
||||
0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x10,
|
||||
0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x04,
|
||||
0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x45, 0x45,
|
||||
0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f,
|
||||
0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x41, 0x4c, 0x53, 0x10,
|
||||
0x06, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f,
|
||||
0x49, 0x44, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41,
|
||||
0x54, 0x45, 0x10, 0x08, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x2a, 0x72, 0x0a, 0x0a,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48,
|
||||
0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
|
||||
0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41,
|
||||
0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14,
|
||||
0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45,
|
||||
0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f,
|
||||
0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03,
|
||||
0x42, 0xb3, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f,
|
||||
0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6c,
|
||||
0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x43, 0xaa, 0x02, 0x21, 0x43, 0x73, 0x33, 0x2e, 0x53, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x43, 0x73,
|
||||
0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62,
|
||||
0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2,
|
||||
0x02, 0x2d, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x43, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x24, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a,
|
||||
0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+278
-220
@@ -155,10 +155,9 @@ func (ShareType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_cs3_sharing_ocm_v1beta1_resources_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// Shares are relationships between a resource owner
|
||||
// (usually the authenticated user) who grants permissions to a recipient
|
||||
// (grantee) on a specified resource (resource_id). UserShares represents both
|
||||
// user and groups.
|
||||
// OCM Shares are shares created by a local owner (usually the authenticated user),
|
||||
// who grants permissions to a remote recipient (grantee) on a specified (local) resource (resource_id).
|
||||
// UserShares represents both user and groups.
|
||||
type Share struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -204,9 +203,13 @@ type Share struct {
|
||||
// Recipient share type.
|
||||
ShareType ShareType `protobuf:"varint,11,opt,name=share_type,json=shareType,proto3,enum=cs3.sharing.ocm.v1beta1.ShareType" json:"share_type,omitempty"`
|
||||
// REQUIRED.
|
||||
// Access methods represent how remote users would access the local resource.
|
||||
AccessMethods []*AccessMethod `protobuf:"bytes,12,rep,name=access_methods,json=accessMethods,proto3" json:"access_methods,omitempty"`
|
||||
// OPTIONAL.
|
||||
Opaque *v1beta12.Opaque `protobuf:"bytes,13,opt,name=opaque,proto3" json:"opaque,omitempty"`
|
||||
// A nonce to be exchanged for a (potentially short-lived) bearer token.
|
||||
Code string `protobuf:"bytes,13,opt,name=code,proto3" json:"code,omitempty"`
|
||||
// OPTIONAL.
|
||||
Opaque *v1beta12.Opaque `protobuf:"bytes,14,opt,name=opaque,proto3" json:"opaque,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Share) Reset() {
|
||||
@@ -325,6 +328,13 @@ func (x *Share) GetAccessMethods() []*AccessMethod {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Share) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Share) GetOpaque() *v1beta12.Opaque {
|
||||
if x != nil {
|
||||
return x.Opaque
|
||||
@@ -388,7 +398,7 @@ func (x *SharePermissions) GetReshare() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// A received share is the share that a grantee will receive.
|
||||
// A received share represents a share offered by a remote user to a local grantee.
|
||||
type ReceivedShare struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -449,6 +459,9 @@ type ReceivedShare struct {
|
||||
// REQUIRED.
|
||||
// Resource type.
|
||||
ResourceType v1beta1.ResourceType `protobuf:"varint,14,opt,name=resource_type,json=resourceType,proto3,enum=cs3.storage.provider.v1beta1.ResourceType" json:"resource_type,omitempty"`
|
||||
// OPTIONAL.
|
||||
// A nonce to be exchanged for a (potentially short-lived) bearer token.
|
||||
Code string `protobuf:"bytes,15,opt,name=code,proto3" json:"code,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReceivedShare) Reset() {
|
||||
@@ -581,6 +594,13 @@ func (x *ReceivedShare) GetResourceType() v1beta1.ResourceType {
|
||||
return v1beta1.ResourceType(0)
|
||||
}
|
||||
|
||||
func (x *ReceivedShare) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Uniquely identifies a share in the share provider.
|
||||
// A share MUST be uniquely identify by four (4) elements:
|
||||
// 1) The share provider id
|
||||
@@ -1011,8 +1031,11 @@ type WebDAVProtocol struct {
|
||||
// Permissions of the shared resource.
|
||||
Permissions *SharePermissions `protobuf:"bytes,2,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
||||
// REQUIRED.
|
||||
// WebDAV URI used to access the resource.
|
||||
// Path-only URI used to access the resource.
|
||||
Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
|
||||
// OPTIONAL.
|
||||
// The requirements for the share.
|
||||
Requirements []string `protobuf:"bytes,4,rep,name=requirements,proto3" json:"requirements,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WebDAVProtocol) Reset() {
|
||||
@@ -1068,6 +1091,13 @@ func (x *WebDAVProtocol) GetUri() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WebDAVProtocol) GetRequirements() []string {
|
||||
if x != nil {
|
||||
return x.Requirements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Defines the options for the Webapp protocol.
|
||||
type WebappProtocol struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -1075,11 +1105,14 @@ type WebappProtocol struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// REQUIRED.
|
||||
// Template URI to open the resource with a remote app.
|
||||
UriTemplate string `protobuf:"bytes,1,opt,name=uri_template,json=uriTemplate,proto3" json:"uri_template,omitempty"`
|
||||
// Path-only URI to open the resource with a remote app.
|
||||
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
|
||||
// REQUIRED.
|
||||
// View mode for the remote app.
|
||||
ViewMode v1beta13.ViewMode `protobuf:"varint,2,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.ViewMode" json:"view_mode,omitempty"`
|
||||
// OPTIONAL.
|
||||
// Secret used to access the resource.
|
||||
SharedSecret string `protobuf:"bytes,3,opt,name=shared_secret,json=sharedSecret,proto3" json:"shared_secret,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WebappProtocol) Reset() {
|
||||
@@ -1114,9 +1147,9 @@ func (*WebappProtocol) Descriptor() ([]byte, []int) {
|
||||
return file_cs3_sharing_ocm_v1beta1_resources_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *WebappProtocol) GetUriTemplate() string {
|
||||
func (x *WebappProtocol) GetUri() string {
|
||||
if x != nil {
|
||||
return x.UriTemplate
|
||||
return x.Uri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1128,6 +1161,13 @@ func (x *WebappProtocol) GetViewMode() v1beta13.ViewMode {
|
||||
return v1beta13.ViewMode(0)
|
||||
}
|
||||
|
||||
func (x *WebappProtocol) GetSharedSecret() string {
|
||||
if x != nil {
|
||||
return x.SharedSecret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Defines the options for the Transfer protocol.
|
||||
type TransferProtocol struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -1325,6 +1365,9 @@ type WebDAVAccessMethod struct {
|
||||
// REQUIRED.
|
||||
// The permissions for the share.
|
||||
Permissions *v1beta1.ResourcePermissions `protobuf:"bytes,1,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
||||
// OPTIONAL.
|
||||
// The requirements for the share.
|
||||
Requirements []string `protobuf:"bytes,2,rep,name=requirements,proto3" json:"requirements,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WebDAVAccessMethod) Reset() {
|
||||
@@ -1366,6 +1409,13 @@ func (x *WebDAVAccessMethod) GetPermissions() *v1beta1.ResourcePermissions {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WebDAVAccessMethod) GetRequirements() []string {
|
||||
if x != nil {
|
||||
return x.Requirements
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Defines the options for the Webapp access method.
|
||||
type WebappAccessMethod struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -1483,7 +1533,7 @@ var file_cs3_sharing_ocm_v1beta1_resources_proto_rawDesc = []byte{
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x63, 0x73, 0x33, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x05, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x30,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x05, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x30,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64,
|
||||
@@ -1525,217 +1575,225 @@ var file_cs3_sharing_ocm_v1beta1_resources_proto_rawDesc = []byte{
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65,
|
||||
0x74, 0x68, 0x6f, 0x64, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68,
|
||||
0x6f, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x18, 0x0d, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06,
|
||||
0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x0b, 0x70,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x31, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x07, 0x72, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x22, 0x9d, 0x06, 0x0a, 0x0d, 0x52,
|
||||
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61,
|
||||
0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x6d,
|
||||
0x6f, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72,
|
||||
0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x6f,
|
||||
0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x05, 0x6f,
|
||||
0x77, 0x6e, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x12, 0x32, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05,
|
||||
0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08,
|
||||
0x6f, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75,
|
||||
0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79,
|
||||
0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71,
|
||||
0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12,
|
||||
0x53, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x22, 0xb1,
|
||||
0x06, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x12, 0x30, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
|
||||
0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12, 0x3f,
|
||||
0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47,
|
||||
0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12,
|
||||
0x37, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x07, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x78, 0x70,
|
||||
0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70,
|
||||
0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65,
|
||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||
0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x73,
|
||||
0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
|
||||
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75,
|
||||
0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x0d, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
|
||||
0x12, 0x49, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
|
||||
0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x67,
|
||||
0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e,
|
||||
0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x26, 0x0a, 0x07,
|
||||
0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x70, 0x61, 0x71, 0x75,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x61, 0x71,
|
||||
0x75, 0x65, 0x49, 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x49, 0x64, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70,
|
||||
0x65, 0x63, 0x22, 0x9a, 0x01, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65, 0x47, 0x72, 0x61, 0x6e,
|
||||
0x74, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x65, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22,
|
||||
0xd4, 0x02, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x50, 0x0a, 0x0e,
|
||||
0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57,
|
||||
0x65, 0x62, 0x44, 0x41, 0x56, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x00, 0x52,
|
||||
0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
|
||||
0x0a, 0x0e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x70, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48,
|
||||
0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x61, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x12, 0x56, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
|
||||
0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x69, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06,
|
||||
0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x22, 0x94, 0x01, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x44, 0x41,
|
||||
0x56, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61,
|
||||
0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x4b,
|
||||
0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68,
|
||||
0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b,
|
||||
0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75,
|
||||
0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x22, 0x74, 0x0a,
|
||||
0x0e, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12,
|
||||
0x21, 0x0a, 0x0c, 0x75, 0x72, 0x69, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x72, 0x69, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x76, 0x69, 0x65, 0x77, 0x4d,
|
||||
0x6f, 0x64, 0x65, 0x22, 0x6a, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65,
|
||||
0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x73,
|
||||
0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22,
|
||||
0xe4, 0x02, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
|
||||
0x12, 0x54, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x44, 0x41, 0x56, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x4f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x70,
|
||||
0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
|
||||
0x6d, 0x70, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x6d, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74,
|
||||
0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a,
|
||||
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
|
||||
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x73,
|
||||
0x68, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63,
|
||||
0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f,
|
||||
0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e,
|
||||
0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12,
|
||||
0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70, 0x41,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x10,
|
||||
0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
|
||||
0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x69, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0e,
|
||||
0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06,
|
||||
0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x22, 0x69, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x44, 0x41, 0x56,
|
||||
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x53, 0x0a, 0x0b,
|
||||
0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x31, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x22, 0x55, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70, 0x41, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x5f,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08,
|
||||
0x76, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x61, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e,
|
||||
0x73, 0x66, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
|
||||
0x12, 0x49, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b,
|
||||
0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x72, 0x0a, 0x0a, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41,
|
||||
0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44,
|
||||
0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54,
|
||||
0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53,
|
||||
0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50,
|
||||
0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53,
|
||||
0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a,
|
||||
0x4e, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12,
|
||||
0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c,
|
||||
0x49, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59,
|
||||
0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x48, 0x41,
|
||||
0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x02, 0x42,
|
||||
0xed, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72,
|
||||
0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42,
|
||||
0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||
0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73,
|
||||
0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73, 0x33, 0x61, 0x70, 0x69, 0x73, 0x2f,
|
||||
0x63, 0x73, 0x33, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x63, 0x6d, 0x2f,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6f, 0x63, 0x6d, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x4f, 0xaa, 0x02, 0x17, 0x43, 0x73, 0x33, 0x2e, 0x53,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x63, 0x6d, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43,
|
||||
0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x56,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0xea, 0x02, 0x1a, 0x43, 0x73, 0x33, 0x3a, 0x3a, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x3a, 0x3a, 0x4f, 0x63, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70,
|
||||
0x61, 0x71, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f,
|
||||
0x70, 0x61, 0x71, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x12, 0x4f, 0x0a,
|
||||
0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12,
|
||||
0x37, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x75, 0x73,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e,
|
||||
0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x07, 0x67, 0x72, 0x61,
|
||||
0x6e, 0x74, 0x65, 0x65, 0x22, 0x26, 0x0a, 0x07, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x49, 0x64, 0x22, 0x9b, 0x01, 0x0a,
|
||||
0x0e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
|
||||
0x32, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x49, 0x64, 0x48, 0x00, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x21, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f,
|
||||
0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x9a, 0x01, 0x0a, 0x0a, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x72, 0x61,
|
||||
0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x73, 0x33,
|
||||
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x65, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x70, 0x65,
|
||||
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x29, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63,
|
||||
0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd4, 0x02, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x50, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x6f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63,
|
||||
0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x44, 0x41, 0x56, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x4f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x70,
|
||||
0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27,
|
||||
0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x56, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e,
|
||||
0x73, 0x66, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61,
|
||||
0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x00, 0x52,
|
||||
0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x12, 0x44, 0x0a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70,
|
||||
0x61, 0x71, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x22, 0xb8,
|
||||
0x01, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x44, 0x41, 0x56, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
|
||||
0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64,
|
||||
0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71,
|
||||
0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x0e, 0x57, 0x65,
|
||||
0x62, 0x61, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x3f,
|
||||
0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65,
|
||||
0x77, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x22, 0x6a, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72,
|
||||
0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,
|
||||
0x22, 0xe4, 0x02, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f,
|
||||
0x64, 0x12, 0x54, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x6f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x73, 0x33, 0x2e,
|
||||
0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x44, 0x41, 0x56, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76,
|
||||
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x70, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x2b, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63,
|
||||
0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x61, 0x70, 0x70,
|
||||
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a,
|
||||
0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x68,
|
||||
0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66,
|
||||
0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x67, 0x65, 0x6e,
|
||||
0x65, 0x72, 0x69, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x48, 0x00, 0x52,
|
||||
0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42,
|
||||
0x06, 0x0a, 0x04, 0x74, 0x65, 0x72, 0x6d, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x44,
|
||||
0x41, 0x56, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x53,
|
||||
0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69,
|
||||
0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x61, 0x70,
|
||||
0x70, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x3f, 0x0a,
|
||||
0x09, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x22, 0x2e, 0x63, 0x73, 0x33, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77,
|
||||
0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x61,
|
||||
0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x49, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2a, 0x72, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||
0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49,
|
||||
0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x52,
|
||||
0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10,
|
||||
0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45,
|
||||
0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53,
|
||||
0x48, 0x41, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43,
|
||||
0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x4e, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x72, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48,
|
||||
0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52,
|
||||
0x4f, 0x55, 0x50, 0x10, 0x02, 0x42, 0xed, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x73,
|
||||
0x33, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x63, 0x6d, 0x2e, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x73, 0x33, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x73,
|
||||
0x33, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x73, 0x33, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x2f, 0x6f, 0x63, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6f, 0x63,
|
||||
0x6d, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x4f, 0xaa, 0x02,
|
||||
0x17, 0x43, 0x73, 0x33, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x63, 0x6d,
|
||||
0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x17, 0x43, 0x73, 0x33, 0x5c, 0x53,
|
||||
0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x73, 0x33, 0x5c, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x5c, 0x4f, 0x63, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x43, 0x73, 0x33, 0x3a, 0x3a,
|
||||
0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x4f, 0x63, 0x6d, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+3
@@ -25,6 +25,7 @@ Asta Xie <xiemengjun at gmail.com>
|
||||
B Lamarche <blam413 at gmail.com>
|
||||
Bes Dollma <bdollma@thousandeyes.com>
|
||||
Bogdan Constantinescu <bog.con.bc at gmail.com>
|
||||
Brad Higgins <brad at defined.net>
|
||||
Brian Hendriks <brian at dolthub.com>
|
||||
Bulat Gaifullin <gaifullinbf at gmail.com>
|
||||
Caine Jette <jette at alum.mit.edu>
|
||||
@@ -37,6 +38,7 @@ Daniel Montoya <dsmontoyam at gmail.com>
|
||||
Daniel Nichter <nil at codenode.com>
|
||||
Daniël van Eeden <git at myname.nl>
|
||||
Dave Protasowski <dprotaso at gmail.com>
|
||||
Diego Dupin <diego.dupin at gmail.com>
|
||||
Dirkjan Bussink <d.bussink at gmail.com>
|
||||
DisposaBoy <disposaboy at dby.me>
|
||||
Egor Smolyakov <egorsmkv at gmail.com>
|
||||
@@ -133,6 +135,7 @@ Ziheng Lyu <zihenglv at gmail.com>
|
||||
|
||||
Barracuda Networks, Inc.
|
||||
Counting Ltd.
|
||||
Defined Networking Inc.
|
||||
DigitalOcean Inc.
|
||||
Dolthub Inc.
|
||||
dyves labs AG
|
||||
|
||||
+11
@@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## v1.9.3 (2025-06-13)
|
||||
|
||||
* `tx.Commit()` and `tx.Rollback()` returned `ErrInvalidConn` always.
|
||||
Now they return cached real error if present. (#1690)
|
||||
|
||||
* Optimize reading small resultsets to fix performance regression
|
||||
introduced by compression protocol support. (#1707)
|
||||
|
||||
* Fix `db.Ping()` on compressed connection. (#1723)
|
||||
|
||||
|
||||
## v1.9.2 (2025-04-07)
|
||||
|
||||
v1.9.2 is a re-release of v1.9.1 due to a release process issue; no changes were made to the content.
|
||||
|
||||
+8
-10
@@ -42,6 +42,11 @@ func (b *buffer) busy() bool {
|
||||
return len(b.buf) > 0
|
||||
}
|
||||
|
||||
// len returns how many bytes in the read buffer.
|
||||
func (b *buffer) len() int {
|
||||
return len(b.buf)
|
||||
}
|
||||
|
||||
// fill reads into the read buffer until at least _need_ bytes are in it.
|
||||
func (b *buffer) fill(need int, r readerFunc) error {
|
||||
// we'll move the contents of the current buffer to dest before filling it.
|
||||
@@ -86,17 +91,10 @@ func (b *buffer) fill(need int, r readerFunc) error {
|
||||
|
||||
// returns next N bytes from buffer.
|
||||
// The returned slice is only guaranteed to be valid until the next read
|
||||
func (b *buffer) readNext(need int, r readerFunc) ([]byte, error) {
|
||||
if len(b.buf) < need {
|
||||
// refill
|
||||
if err := b.fill(need, r); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
data := b.buf[:need]
|
||||
func (b *buffer) readNext(need int) []byte {
|
||||
data := b.buf[:need:need]
|
||||
b.buf = b.buf[need:]
|
||||
return data, nil
|
||||
return data
|
||||
}
|
||||
|
||||
// takeBuffer returns a buffer with the requested size.
|
||||
|
||||
+10
-11
@@ -84,9 +84,9 @@ func (c *compIO) reset() {
|
||||
c.buff.Reset()
|
||||
}
|
||||
|
||||
func (c *compIO) readNext(need int, r readerFunc) ([]byte, error) {
|
||||
func (c *compIO) readNext(need int) ([]byte, error) {
|
||||
for c.buff.Len() < need {
|
||||
if err := c.readCompressedPacket(r); err != nil {
|
||||
if err := c.readCompressedPacket(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
@@ -94,8 +94,8 @@ func (c *compIO) readNext(need int, r readerFunc) ([]byte, error) {
|
||||
return data[:need:need], nil // prevent caller writes into c.buff
|
||||
}
|
||||
|
||||
func (c *compIO) readCompressedPacket(r readerFunc) error {
|
||||
header, err := c.mc.buf.readNext(7, r) // size of compressed header
|
||||
func (c *compIO) readCompressedPacket() error {
|
||||
header, err := c.mc.readNext(7)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func (c *compIO) readCompressedPacket(r readerFunc) error {
|
||||
|
||||
// compressed header structure
|
||||
comprLength := getUint24(header[0:3])
|
||||
compressionSequence := uint8(header[3])
|
||||
compressionSequence := header[3]
|
||||
uncompressedLength := getUint24(header[4:7])
|
||||
if debug {
|
||||
fmt.Printf("uncompress cmplen=%v uncomplen=%v pkt_cmp_seq=%v expected_cmp_seq=%v\n",
|
||||
@@ -113,14 +113,13 @@ func (c *compIO) readCompressedPacket(r readerFunc) error {
|
||||
// Server may return error packet (e.g. 1153 Got a packet bigger than 'max_allowed_packet' bytes)
|
||||
// before receiving all packets from client. In this case, seqnr is younger than expected.
|
||||
// NOTE: Both of mariadbclient and mysqlclient do not check seqnr. Only server checks it.
|
||||
if debug && compressionSequence != c.mc.sequence {
|
||||
if debug && compressionSequence != c.mc.compressSequence {
|
||||
fmt.Printf("WARN: unexpected cmpress seq nr: expected %v, got %v",
|
||||
c.mc.sequence, compressionSequence)
|
||||
c.mc.compressSequence, compressionSequence)
|
||||
}
|
||||
c.mc.sequence = compressionSequence + 1
|
||||
c.mc.compressSequence = c.mc.sequence
|
||||
c.mc.compressSequence = compressionSequence + 1
|
||||
|
||||
comprData, err := c.mc.buf.readNext(comprLength, r)
|
||||
comprData, err := c.mc.readNext(comprLength)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -200,7 +199,7 @@ func (c *compIO) writeCompressedPacket(data []byte, uncompressedLen int) (int, e
|
||||
comprLength := len(data) - 7
|
||||
if debug {
|
||||
fmt.Printf(
|
||||
"writeCompressedPacket: comprLength=%v, uncompressedLen=%v, seq=%v",
|
||||
"writeCompressedPacket: comprLength=%v, uncompressedLen=%v, seq=%v\n",
|
||||
comprLength, uncompressedLen, mc.compressSequence)
|
||||
}
|
||||
|
||||
|
||||
+29
-20
@@ -17,6 +17,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
@@ -25,19 +26,30 @@ import (
|
||||
// https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_PROTOCOL.html
|
||||
// https://mariadb.com/kb/en/clientserver-protocol/
|
||||
|
||||
// read n bytes from mc.buf
|
||||
func (mc *mysqlConn) readNext(n int) ([]byte, error) {
|
||||
if mc.buf.len() < n {
|
||||
err := mc.buf.fill(n, mc.readWithTimeout)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return mc.buf.readNext(n), nil
|
||||
}
|
||||
|
||||
// Read packet to buffer 'data'
|
||||
func (mc *mysqlConn) readPacket() ([]byte, error) {
|
||||
var prevData []byte
|
||||
invalidSequence := false
|
||||
|
||||
readNext := mc.buf.readNext
|
||||
readNext := mc.readNext
|
||||
if mc.compress {
|
||||
readNext = mc.compIO.readNext
|
||||
}
|
||||
|
||||
for {
|
||||
// read packet header
|
||||
data, err := readNext(4, mc.readWithTimeout)
|
||||
data, err := readNext(4)
|
||||
if err != nil {
|
||||
mc.close()
|
||||
if cerr := mc.canceled.Value(); cerr != nil {
|
||||
@@ -51,17 +63,11 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
|
||||
pktLen := getUint24(data[:3])
|
||||
seq := data[3]
|
||||
|
||||
if mc.compress {
|
||||
// check packet sync [8 bit]
|
||||
if seq != mc.sequence {
|
||||
mc.log(fmt.Sprintf("[warn] unexpected sequence nr: expected %v, got %v", mc.sequence, seq))
|
||||
// MySQL and MariaDB doesn't check packet nr in compressed packet.
|
||||
if debug && seq != mc.compressSequence {
|
||||
fmt.Printf("[debug] mismatched compression sequence nr: expected: %v, got %v",
|
||||
mc.compressSequence, seq)
|
||||
}
|
||||
mc.compressSequence = seq + 1
|
||||
} else {
|
||||
// check packet sync [8 bit]
|
||||
if seq != mc.sequence {
|
||||
mc.log(fmt.Sprintf("[warn] unexpected seq nr: expected %v, got %v", mc.sequence, seq))
|
||||
if !mc.compress {
|
||||
// For large packets, we stop reading as soon as sync error.
|
||||
if len(prevData) > 0 {
|
||||
mc.close()
|
||||
@@ -69,8 +75,8 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
|
||||
}
|
||||
invalidSequence = true
|
||||
}
|
||||
mc.sequence++
|
||||
}
|
||||
mc.sequence = seq + 1
|
||||
|
||||
// packets with length 0 terminate a previous packet which is a
|
||||
// multiple of (2^24)-1 bytes long
|
||||
@@ -85,7 +91,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
|
||||
}
|
||||
|
||||
// read packet body [pktLen bytes]
|
||||
data, err = readNext(pktLen, mc.readWithTimeout)
|
||||
data, err = readNext(pktLen)
|
||||
if err != nil {
|
||||
mc.close()
|
||||
if cerr := mc.canceled.Value(); cerr != nil {
|
||||
@@ -135,7 +141,7 @@ func (mc *mysqlConn) writePacket(data []byte) error {
|
||||
|
||||
// Write packet
|
||||
if debug {
|
||||
fmt.Printf("writePacket: size=%v seq=%v", size, mc.sequence)
|
||||
fmt.Fprintf(os.Stderr, "writePacket: size=%v seq=%v\n", size, mc.sequence)
|
||||
}
|
||||
|
||||
n, err := writeFunc(data[:4+size])
|
||||
@@ -434,7 +440,9 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
|
||||
data[4] = command
|
||||
|
||||
// Send CMD packet
|
||||
return mc.writePacket(data)
|
||||
err = mc.writePacket(data)
|
||||
mc.syncSequence()
|
||||
return err
|
||||
}
|
||||
|
||||
func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
|
||||
@@ -475,7 +483,9 @@ func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
|
||||
binary.LittleEndian.PutUint32(data[5:], arg)
|
||||
|
||||
// Send CMD packet
|
||||
return mc.writePacket(data)
|
||||
err = mc.writePacket(data)
|
||||
mc.syncSequence()
|
||||
return err
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -945,7 +955,6 @@ func (stmt *mysqlStmt) writeCommandLongData(paramID int, arg []byte) error {
|
||||
pktLen = dataOffset + argLen
|
||||
}
|
||||
|
||||
stmt.mc.resetSequence()
|
||||
// Add command byte [1 byte]
|
||||
data[4] = comStmtSendLongData
|
||||
|
||||
@@ -957,6 +966,8 @@ func (stmt *mysqlStmt) writeCommandLongData(paramID int, arg []byte) error {
|
||||
|
||||
// Send CMD packet
|
||||
err := stmt.mc.writePacket(data[:4+pktLen])
|
||||
// Every COM_LONG_DATA packet reset Packet Sequence
|
||||
stmt.mc.resetSequence()
|
||||
if err == nil {
|
||||
data = data[pktLen-dataOffset:]
|
||||
continue
|
||||
@@ -964,8 +975,6 @@ func (stmt *mysqlStmt) writeCommandLongData(paramID int, arg []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Reset Packet Sequence
|
||||
stmt.mc.resetSequence()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+16
-2
@@ -13,18 +13,32 @@ type mysqlTx struct {
|
||||
}
|
||||
|
||||
func (tx *mysqlTx) Commit() (err error) {
|
||||
if tx.mc == nil || tx.mc.closed.Load() {
|
||||
if tx.mc == nil {
|
||||
return ErrInvalidConn
|
||||
}
|
||||
if tx.mc.closed.Load() {
|
||||
err = tx.mc.error()
|
||||
if err == nil {
|
||||
err = ErrInvalidConn
|
||||
}
|
||||
return
|
||||
}
|
||||
err = tx.mc.exec("COMMIT")
|
||||
tx.mc = nil
|
||||
return
|
||||
}
|
||||
|
||||
func (tx *mysqlTx) Rollback() (err error) {
|
||||
if tx.mc == nil || tx.mc.closed.Load() {
|
||||
if tx.mc == nil {
|
||||
return ErrInvalidConn
|
||||
}
|
||||
if tx.mc.closed.Load() {
|
||||
err = tx.mc.error()
|
||||
if err == nil {
|
||||
err = ErrInvalidConn
|
||||
}
|
||||
return
|
||||
}
|
||||
err = tx.mc.exec("ROLLBACK")
|
||||
tx.mc = nil
|
||||
return
|
||||
|
||||
+7
-8
@@ -759,13 +759,9 @@ func (c *Client) ListObjects(ctx context.Context, bucketName string, opts ListOb
|
||||
objectStatCh := make(chan ObjectInfo, 1)
|
||||
go func() {
|
||||
defer close(objectStatCh)
|
||||
send := func(obj ObjectInfo) bool {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return false
|
||||
case objectStatCh <- obj:
|
||||
return true
|
||||
}
|
||||
if contextCanceled(ctx) {
|
||||
objectStatCh <- ObjectInfo{Err: ctx.Err()}
|
||||
return
|
||||
}
|
||||
|
||||
var objIter iter.Seq[ObjectInfo]
|
||||
@@ -783,8 +779,11 @@ func (c *Client) ListObjects(ctx context.Context, bucketName string, opts ListOb
|
||||
}
|
||||
}
|
||||
for obj := range objIter {
|
||||
if !send(obj) {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
objectStatCh <- ObjectInfo{Err: ctx.Err()}
|
||||
return
|
||||
case objectStatCh <- obj:
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ type Options struct {
|
||||
// Global constants.
|
||||
const (
|
||||
libraryName = "minio-go"
|
||||
libraryVersion = "v7.0.93"
|
||||
libraryVersion = "v7.0.94"
|
||||
)
|
||||
|
||||
// User Agent should always following the below style.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2021 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2013-2024 The NATS Authors
|
||||
// Copyright 2013-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+9
-1
@@ -50,7 +50,15 @@ var maxSubLimitReportThreshold = defaultMaxSubLimitReportThreshold
|
||||
// Account are subject namespace definitions. By default no messages are shared between accounts.
|
||||
// You can share via Exports and Imports of Streams and Services.
|
||||
type Account struct {
|
||||
stats
|
||||
// Total stats for the account.
|
||||
stats struct {
|
||||
sync.Mutex
|
||||
stats // Totals
|
||||
gw stats // Gateways
|
||||
rt stats // Routes
|
||||
ln stats // Leafnodes
|
||||
}
|
||||
|
||||
gwReplyMapping
|
||||
Name string
|
||||
Nkey string
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2024 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023-2024 The NATS Authors
|
||||
// Copyright 2023-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2024 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2023 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2024 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016-2020 The NATS Authors
|
||||
// Copyright 2016-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+67
-12
@@ -1446,14 +1446,25 @@ func (c *client) readLoop(pre []byte) {
|
||||
// Updates stats for client and server that were collected
|
||||
// from parsing through the buffer.
|
||||
if c.in.msgs > 0 {
|
||||
atomic.AddInt64(&c.inMsgs, int64(c.in.msgs))
|
||||
atomic.AddInt64(&c.inBytes, int64(c.in.bytes))
|
||||
inMsgs := int64(c.in.msgs)
|
||||
inBytes := int64(c.in.bytes)
|
||||
|
||||
atomic.AddInt64(&c.inMsgs, inMsgs)
|
||||
atomic.AddInt64(&c.inBytes, inBytes)
|
||||
|
||||
if acc != nil {
|
||||
atomic.AddInt64(&acc.inMsgs, int64(c.in.msgs))
|
||||
atomic.AddInt64(&acc.inBytes, int64(c.in.bytes))
|
||||
acc.stats.Lock()
|
||||
acc.stats.inMsgs += inMsgs
|
||||
acc.stats.inBytes += inBytes
|
||||
if c.kind == LEAF {
|
||||
acc.stats.ln.inMsgs += int64(inMsgs)
|
||||
acc.stats.ln.inBytes += int64(inBytes)
|
||||
}
|
||||
acc.stats.Unlock()
|
||||
}
|
||||
atomic.AddInt64(&s.inMsgs, int64(c.in.msgs))
|
||||
atomic.AddInt64(&s.inBytes, int64(c.in.bytes))
|
||||
|
||||
atomic.AddInt64(&s.inMsgs, inMsgs)
|
||||
atomic.AddInt64(&s.inBytes, inBytes)
|
||||
}
|
||||
|
||||
// Signal to writeLoop to flush to socket.
|
||||
@@ -1806,7 +1817,9 @@ func (c *client) handleWriteTimeout(written, attempted int64, numChunks int) boo
|
||||
c.srv.scStats.leafs.Add(1)
|
||||
}
|
||||
if c.acc != nil {
|
||||
atomic.AddInt64(&c.acc.slowConsumers, 1)
|
||||
c.acc.stats.Lock()
|
||||
c.acc.stats.slowConsumers++
|
||||
c.acc.stats.Unlock()
|
||||
}
|
||||
c.Noticef("Slow Consumer %s: WriteDeadline of %v exceeded with %d chunks of %d total bytes.",
|
||||
scState, c.out.wdl, numChunks, attempted)
|
||||
@@ -2356,7 +2369,9 @@ func (c *client) queueOutbound(data []byte) {
|
||||
atomic.AddInt64(&c.srv.slowConsumers, 1)
|
||||
c.srv.scStats.clients.Add(1)
|
||||
if c.acc != nil {
|
||||
atomic.AddInt64(&c.acc.slowConsumers, 1)
|
||||
c.acc.stats.Lock()
|
||||
c.acc.stats.slowConsumers++
|
||||
c.acc.stats.Unlock()
|
||||
}
|
||||
c.Noticef("Slow Consumer Detected: MaxPending of %d Exceeded", c.out.mp)
|
||||
c.markConnAsClosed(SlowConsumerPendingBytes)
|
||||
@@ -3494,10 +3509,18 @@ func (c *client) deliverMsg(prodIsMQTT bool, sub *subscription, acc *Account, su
|
||||
|
||||
// Check if we are a leafnode and have perms to check.
|
||||
if client.kind == LEAF && client.perms != nil {
|
||||
if !client.pubAllowedFullCheck(string(subject), true, true) {
|
||||
var subjectToCheck []byte
|
||||
if subject[0] == '_' && bytes.HasPrefix(subject, []byte(gwReplyPrefix)) {
|
||||
subjectToCheck = subject[gwSubjectOffset:]
|
||||
} else if subject[0] == '$' && bytes.HasPrefix(subject, []byte(oldGWReplyPrefix)) {
|
||||
subjectToCheck = subject[oldGWReplyStart:]
|
||||
} else {
|
||||
subjectToCheck = subject
|
||||
}
|
||||
if !client.pubAllowedFullCheck(string(subjectToCheck), true, true) {
|
||||
mt.addEgressEvent(client, sub, errMsgTracePubViolation)
|
||||
client.mu.Unlock()
|
||||
client.Debugf("Not permitted to deliver to %q", subject)
|
||||
client.Debugf("Not permitted to deliver to %q", subjectToCheck)
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -4727,6 +4750,8 @@ func (c *client) processMsgResults(acc *Account, r *SublistResult, msg, deliver,
|
||||
// by having an extra size
|
||||
var dlvMsgs int64
|
||||
var dlvExtraSize int64
|
||||
var dlvRouteMsgs int64
|
||||
var dlvLeafMsgs int64
|
||||
|
||||
// We need to know if this is a MQTT producer because they send messages
|
||||
// without CR_LF (we otherwise remove the size of CR_LF from message size).
|
||||
@@ -4736,15 +4761,33 @@ func (c *client) processMsgResults(acc *Account, r *SublistResult, msg, deliver,
|
||||
if dlvMsgs == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
totalBytes := dlvMsgs*int64(len(msg)) + dlvExtraSize
|
||||
routeBytes := dlvRouteMsgs*int64(len(msg)) + dlvExtraSize
|
||||
leafBytes := dlvLeafMsgs*int64(len(msg)) + dlvExtraSize
|
||||
|
||||
// For non MQTT producers, remove the CR_LF * number of messages
|
||||
if !prodIsMQTT {
|
||||
totalBytes -= dlvMsgs * int64(LEN_CR_LF)
|
||||
routeBytes -= dlvRouteMsgs * int64(LEN_CR_LF)
|
||||
leafBytes -= dlvLeafMsgs * int64(LEN_CR_LF)
|
||||
}
|
||||
|
||||
if acc != nil {
|
||||
atomic.AddInt64(&acc.outMsgs, dlvMsgs)
|
||||
atomic.AddInt64(&acc.outBytes, totalBytes)
|
||||
acc.stats.Lock()
|
||||
acc.stats.outMsgs += dlvMsgs
|
||||
acc.stats.outBytes += totalBytes
|
||||
if dlvRouteMsgs > 0 {
|
||||
acc.stats.rt.outMsgs += dlvRouteMsgs
|
||||
acc.stats.rt.outBytes += routeBytes
|
||||
}
|
||||
if dlvLeafMsgs > 0 {
|
||||
acc.stats.ln.outMsgs += dlvLeafMsgs
|
||||
acc.stats.ln.outBytes += leafBytes
|
||||
}
|
||||
acc.stats.Unlock()
|
||||
}
|
||||
|
||||
if srv := c.srv; srv != nil {
|
||||
atomic.AddInt64(&srv.outMsgs, dlvMsgs)
|
||||
atomic.AddInt64(&srv.outBytes, totalBytes)
|
||||
@@ -5065,6 +5108,12 @@ func (c *client) processMsgResults(acc *Account, r *SublistResult, msg, deliver,
|
||||
// Update only if not skipped.
|
||||
if !skipDelivery && sub.icb == nil {
|
||||
dlvMsgs++
|
||||
switch sub.client.kind {
|
||||
case ROUTER:
|
||||
dlvRouteMsgs++
|
||||
case LEAF:
|
||||
dlvLeafMsgs++
|
||||
}
|
||||
}
|
||||
// Do the rest even when message delivery was skipped.
|
||||
didDeliver = true
|
||||
@@ -5155,6 +5204,12 @@ sendToRoutesOrLeafs:
|
||||
if c.deliverMsg(prodIsMQTT, rt.sub, acc, subject, reply, mh, dmsg, false) {
|
||||
if rt.sub.icb == nil {
|
||||
dlvMsgs++
|
||||
switch dc.kind {
|
||||
case ROUTER:
|
||||
dlvRouteMsgs++
|
||||
case LEAF:
|
||||
dlvLeafMsgs++
|
||||
}
|
||||
dlvExtraSize += int64(len(dmsg) - len(msg))
|
||||
}
|
||||
didDeliver = true
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -58,7 +58,7 @@ func init() {
|
||||
|
||||
const (
|
||||
// VERSION is the current version for the server.
|
||||
VERSION = "2.11.4"
|
||||
VERSION = "2.11.5"
|
||||
|
||||
// PROTO is the currently supported protocol.
|
||||
// 0 was the original
|
||||
|
||||
+17
-9
@@ -3304,11 +3304,10 @@ func (o *consumer) needAck(sseq uint64, subj string) bool {
|
||||
// Check if we are filtered, and if so check if this is even applicable to us.
|
||||
if isFiltered {
|
||||
if subj == _EMPTY_ {
|
||||
var svp StoreMsg
|
||||
if _, err := o.mset.store.LoadMsg(sseq, &svp); err != nil {
|
||||
var err error
|
||||
if subj, err = o.mset.store.SubjectForSeq(sseq); err != nil {
|
||||
return false
|
||||
}
|
||||
subj = svp.subj
|
||||
}
|
||||
if !o.isFilteredMatch(subj) {
|
||||
return false
|
||||
@@ -3918,7 +3917,12 @@ func (o *consumer) processNextMsgRequest(reply string, msg []byte) {
|
||||
wr.received = time.Now()
|
||||
|
||||
if err := o.waiting.add(wr); err != nil {
|
||||
sendErr(409, "Exceeded MaxWaiting")
|
||||
// If the client has a heartbeat interval set, don't bother responding with a 409,
|
||||
// otherwise we can end up in a hot loop with the client re-requesting instead of
|
||||
// waiting for the missing heartbeats instead and retrying.
|
||||
if hb == 0 {
|
||||
sendErr(409, "Exceeded MaxWaiting")
|
||||
}
|
||||
wr.recycle()
|
||||
return
|
||||
}
|
||||
@@ -4106,6 +4110,7 @@ func (o *consumer) getNextMsg() (*jsPubMsg, uint64, error) {
|
||||
o.updateSkipped(o.sseq)
|
||||
} else {
|
||||
o.lss.seqs = o.lss.seqs[1:]
|
||||
o.sseq = seq
|
||||
}
|
||||
pmsg := getJSPubMsgFromPool()
|
||||
sm, err := o.mset.store.LoadMsg(seq, &pmsg.StoreMsg)
|
||||
@@ -4479,6 +4484,7 @@ func (o *consumer) loopAndGatherMsgs(qch chan struct{}) {
|
||||
delay time.Duration
|
||||
sz int
|
||||
wrn, wrb int
|
||||
wrNoWait bool
|
||||
)
|
||||
|
||||
o.mu.Lock()
|
||||
@@ -4557,7 +4563,7 @@ func (o *consumer) loopAndGatherMsgs(qch chan struct{}) {
|
||||
if o.isPushMode() {
|
||||
dsubj = o.dsubj
|
||||
} else if wr := o.nextWaiting(sz); wr != nil {
|
||||
wrn, wrb = wr.n, wr.b
|
||||
wrn, wrb, wrNoWait = wr.n, wr.b, wr.noWait
|
||||
dsubj = wr.reply
|
||||
if o.cfg.PriorityPolicy == PriorityPinnedClient {
|
||||
// FIXME(jrm): Can we make this prettier?
|
||||
@@ -4632,7 +4638,7 @@ func (o *consumer) loopAndGatherMsgs(qch chan struct{}) {
|
||||
}
|
||||
|
||||
// Do actual delivery.
|
||||
o.deliverMsg(dsubj, ackReply, pmsg, dc, rp)
|
||||
o.deliverMsg(dsubj, ackReply, pmsg, dc, rp, wrNoWait)
|
||||
|
||||
// If given request fulfilled batch size, but there are still pending bytes, send information about it.
|
||||
if wrn <= 0 && wrb > 0 {
|
||||
@@ -4831,7 +4837,7 @@ func convertToHeadersOnly(pmsg *jsPubMsg) {
|
||||
|
||||
// Deliver a msg to the consumer.
|
||||
// Lock should be held and o.mset validated to be non-nil.
|
||||
func (o *consumer) deliverMsg(dsubj, ackReply string, pmsg *jsPubMsg, dc uint64, rp RetentionPolicy) {
|
||||
func (o *consumer) deliverMsg(dsubj, ackReply string, pmsg *jsPubMsg, dc uint64, rp RetentionPolicy, wrNoWait bool) {
|
||||
if o.mset == nil {
|
||||
pmsg.returnToPool()
|
||||
return
|
||||
@@ -4867,7 +4873,9 @@ func (o *consumer) deliverMsg(dsubj, ackReply string, pmsg *jsPubMsg, dc uint64,
|
||||
// If we're replicated we MUST only send the message AFTER we've got quorum for updating
|
||||
// delivered state. Otherwise, we could be in an invalid state after a leader change.
|
||||
// We can send immediately if not replicated, not using acks, or using flow control (incompatible).
|
||||
if o.node == nil || ap == AckNone || o.cfg.FlowControl {
|
||||
// TODO(mvv): If NoWait we also bypass replicating first.
|
||||
// Ideally we'd only send the NoWait request timeout after replication and delivery.
|
||||
if o.node == nil || ap == AckNone || o.cfg.FlowControl || wrNoWait {
|
||||
o.outq.send(pmsg)
|
||||
} else {
|
||||
o.addReplicatedQueuedMsg(pmsg)
|
||||
@@ -5351,7 +5359,7 @@ func (o *consumer) selectStartingSeqNo() {
|
||||
if mmp == 1 {
|
||||
o.sseq = state.FirstSeq
|
||||
} else {
|
||||
var filters []string
|
||||
filters := make([]string, 0, len(o.subjf))
|
||||
if o.subjf == nil {
|
||||
filters = append(filters, o.cfg.FilterSubject)
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2022 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 The NATS Authors
|
||||
// Copyright 2021-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2021 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2021 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+95
-35
@@ -400,12 +400,19 @@ type GatewayStat struct {
|
||||
NumInbound int `json:"inbound_connections"`
|
||||
}
|
||||
|
||||
// DataStats reports how may msg and bytes. Applicable for both sent and received.
|
||||
type DataStats struct {
|
||||
type dataStats struct {
|
||||
Msgs int64 `json:"msgs"`
|
||||
Bytes int64 `json:"bytes"`
|
||||
}
|
||||
|
||||
// DataStats reports how may msg and bytes. Applicable for both sent and received.
|
||||
type DataStats struct {
|
||||
dataStats
|
||||
Gateways dataStats `json:"gateways,omitempty"`
|
||||
Routes dataStats `json:"routes,omitempty"`
|
||||
Leafs dataStats `json:"leafs,omitempty"`
|
||||
}
|
||||
|
||||
// Used for internally queueing up messages that the server wants to send.
|
||||
type pubMsg struct {
|
||||
c *client
|
||||
@@ -842,12 +849,16 @@ func routeStat(r *client) *RouteStat {
|
||||
rs := &RouteStat{
|
||||
ID: r.cid,
|
||||
Sent: DataStats{
|
||||
Msgs: r.outMsgs,
|
||||
Bytes: r.outBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: r.outMsgs,
|
||||
Bytes: r.outBytes,
|
||||
},
|
||||
},
|
||||
Received: DataStats{
|
||||
Msgs: atomic.LoadInt64(&r.inMsgs),
|
||||
Bytes: atomic.LoadInt64(&r.inBytes),
|
||||
dataStats: dataStats{
|
||||
Msgs: atomic.LoadInt64(&r.inMsgs),
|
||||
Bytes: atomic.LoadInt64(&r.inBytes),
|
||||
},
|
||||
},
|
||||
Pending: int(r.out.pb),
|
||||
}
|
||||
@@ -946,8 +957,10 @@ func (s *Server) sendStatsz(subj string) {
|
||||
// Note that *client.out[Msgs|Bytes] are not set using atomic,
|
||||
// unlike the in[Msgs|bytes].
|
||||
gs.Sent = DataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
},
|
||||
}
|
||||
c.mu.Unlock()
|
||||
// Gather matching inbound connections
|
||||
@@ -2402,22 +2415,57 @@ func (s *Server) sendAccConnsUpdate(a *Account, subj ...string) {
|
||||
func (a *Account) statz() *AccountStat {
|
||||
localConns := a.numLocalConnections()
|
||||
leafConns := a.numLocalLeafNodes()
|
||||
|
||||
a.stats.Lock()
|
||||
received := DataStats{
|
||||
dataStats: dataStats{
|
||||
Msgs: a.stats.inMsgs,
|
||||
Bytes: a.stats.inBytes,
|
||||
},
|
||||
Gateways: dataStats{
|
||||
Msgs: a.stats.gw.inMsgs,
|
||||
Bytes: a.stats.gw.inBytes,
|
||||
},
|
||||
Routes: dataStats{
|
||||
Msgs: a.stats.rt.inMsgs,
|
||||
Bytes: a.stats.rt.inBytes,
|
||||
},
|
||||
Leafs: dataStats{
|
||||
Msgs: a.stats.ln.inMsgs,
|
||||
Bytes: a.stats.ln.inBytes,
|
||||
},
|
||||
}
|
||||
sent := DataStats{
|
||||
dataStats: dataStats{
|
||||
Msgs: a.stats.outMsgs,
|
||||
Bytes: a.stats.outBytes,
|
||||
},
|
||||
Gateways: dataStats{
|
||||
Msgs: a.stats.gw.outMsgs,
|
||||
Bytes: a.stats.gw.outBytes,
|
||||
},
|
||||
Routes: dataStats{
|
||||
Msgs: a.stats.rt.outMsgs,
|
||||
Bytes: a.stats.rt.outBytes,
|
||||
},
|
||||
Leafs: dataStats{
|
||||
Msgs: a.stats.ln.outMsgs,
|
||||
Bytes: a.stats.ln.outBytes,
|
||||
},
|
||||
}
|
||||
slowConsumers := a.stats.slowConsumers
|
||||
a.stats.Unlock()
|
||||
|
||||
return &AccountStat{
|
||||
Account: a.Name,
|
||||
Name: a.getNameTagLocked(),
|
||||
Conns: localConns,
|
||||
LeafNodes: leafConns,
|
||||
TotalConns: localConns + leafConns,
|
||||
NumSubs: a.sl.Count(),
|
||||
Received: DataStats{
|
||||
Msgs: atomic.LoadInt64(&a.inMsgs),
|
||||
Bytes: atomic.LoadInt64(&a.inBytes),
|
||||
},
|
||||
Sent: DataStats{
|
||||
Msgs: atomic.LoadInt64(&a.outMsgs),
|
||||
Bytes: atomic.LoadInt64(&a.outBytes),
|
||||
},
|
||||
SlowConsumers: atomic.LoadInt64(&a.slowConsumers),
|
||||
Account: a.Name,
|
||||
Name: a.getNameTagLocked(),
|
||||
Conns: localConns,
|
||||
LeafNodes: leafConns,
|
||||
TotalConns: localConns + leafConns,
|
||||
NumSubs: a.sl.Count(),
|
||||
Received: received,
|
||||
Sent: sent,
|
||||
SlowConsumers: slowConsumers,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2533,12 +2581,16 @@ func (s *Server) accountDisconnectEvent(c *client, now time.Time, reason string)
|
||||
MQTTClient: c.getMQTTClientID(),
|
||||
},
|
||||
Sent: DataStats{
|
||||
Msgs: atomic.LoadInt64(&c.inMsgs),
|
||||
Bytes: atomic.LoadInt64(&c.inBytes),
|
||||
dataStats: dataStats{
|
||||
Msgs: atomic.LoadInt64(&c.inMsgs),
|
||||
Bytes: atomic.LoadInt64(&c.inBytes),
|
||||
},
|
||||
},
|
||||
Received: DataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
},
|
||||
},
|
||||
Reason: reason,
|
||||
}
|
||||
@@ -2587,12 +2639,16 @@ func (s *Server) sendAuthErrorEvent(c *client) {
|
||||
MQTTClient: c.getMQTTClientID(),
|
||||
},
|
||||
Sent: DataStats{
|
||||
Msgs: c.inMsgs,
|
||||
Bytes: c.inBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.inMsgs,
|
||||
Bytes: c.inBytes,
|
||||
},
|
||||
},
|
||||
Received: DataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
},
|
||||
},
|
||||
Reason: AuthenticationViolation.String(),
|
||||
}
|
||||
@@ -2645,12 +2701,16 @@ func (s *Server) sendAccountAuthErrorEvent(c *client, acc *Account, reason strin
|
||||
MQTTClient: c.getMQTTClientID(),
|
||||
},
|
||||
Sent: DataStats{
|
||||
Msgs: c.inMsgs,
|
||||
Bytes: c.inBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.inMsgs,
|
||||
Bytes: c.inBytes,
|
||||
},
|
||||
},
|
||||
Received: DataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
dataStats: dataStats{
|
||||
Msgs: c.outMsgs,
|
||||
Bytes: c.outBytes,
|
||||
},
|
||||
},
|
||||
Reason: reason,
|
||||
}
|
||||
|
||||
+26
-1
@@ -648,6 +648,13 @@ func (fs *fileStore) UpdateConfig(cfg *StreamConfig) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Create or delete the THW if needed.
|
||||
if cfg.AllowMsgTTL && fs.ttls == nil {
|
||||
fs.ttls = thw.NewHashWheel()
|
||||
} else if !cfg.AllowMsgTTL && fs.ttls != nil {
|
||||
fs.ttls = nil
|
||||
}
|
||||
|
||||
// Limits checks and enforcement.
|
||||
fs.enforceMsgLimit()
|
||||
fs.enforceBytesLimit()
|
||||
@@ -666,7 +673,7 @@ func (fs *fileStore) UpdateConfig(cfg *StreamConfig) error {
|
||||
}
|
||||
fs.mu.Unlock()
|
||||
|
||||
if cfg.MaxAge != 0 {
|
||||
if cfg.MaxAge != 0 || cfg.AllowMsgTTL {
|
||||
fs.expireMsgs()
|
||||
}
|
||||
return nil
|
||||
@@ -7392,6 +7399,24 @@ func (mb *msgBlock) msgFromBufEx(buf []byte, sm *StoreMsg, hh hash.Hash64, doCop
|
||||
return sm, nil
|
||||
}
|
||||
|
||||
// SubjectForSeq will return what the subject is for this sequence if found.
|
||||
func (fs *fileStore) SubjectForSeq(seq uint64) (string, error) {
|
||||
fs.mu.RLock()
|
||||
if seq < fs.state.FirstSeq {
|
||||
fs.mu.RUnlock()
|
||||
return _EMPTY_, ErrStoreMsgNotFound
|
||||
}
|
||||
var smv StoreMsg
|
||||
mb := fs.selectMsgBlock(seq)
|
||||
fs.mu.RUnlock()
|
||||
if mb != nil {
|
||||
if sm, _, _ := mb.fetchMsgNoCopy(seq, &smv); sm != nil {
|
||||
return sm.subj, nil
|
||||
}
|
||||
}
|
||||
return _EMPTY_, ErrStoreMsgNotFound
|
||||
}
|
||||
|
||||
// LoadMsg will lookup the message by sequence number and return it if found.
|
||||
func (fs *fileStore) LoadMsg(seq uint64, sm *StoreMsg) (*StoreMsg, error) {
|
||||
return fs.msgForSeq(seq, sm)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2022 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+16
-4
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018-2024 The NATS Authors
|
||||
// Copyright 2018-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -2732,8 +2732,12 @@ func (c *client) sendMsgToGateways(acc *Account, msg, subject, reply []byte, qgr
|
||||
totalBytes -= dlvMsgs * int64(LEN_CR_LF)
|
||||
}
|
||||
if acc != nil {
|
||||
atomic.AddInt64(&acc.outMsgs, dlvMsgs)
|
||||
atomic.AddInt64(&acc.outBytes, totalBytes)
|
||||
acc.stats.Lock()
|
||||
acc.stats.outMsgs += dlvMsgs
|
||||
acc.stats.outBytes += totalBytes
|
||||
acc.stats.gw.outMsgs += dlvMsgs
|
||||
acc.stats.gw.outBytes += totalBytes
|
||||
acc.stats.Unlock()
|
||||
}
|
||||
atomic.AddInt64(&srv.outMsgs, dlvMsgs)
|
||||
atomic.AddInt64(&srv.outBytes, totalBytes)
|
||||
@@ -3077,7 +3081,8 @@ func (c *client) processInboundGatewayMsg(msg []byte) {
|
||||
// Update statistics
|
||||
c.in.msgs++
|
||||
// The msg includes the CR_LF, so pull back out for accounting.
|
||||
c.in.bytes += int32(len(msg) - LEN_CR_LF)
|
||||
size := len(msg) - LEN_CR_LF
|
||||
c.in.bytes += int32(size)
|
||||
|
||||
if c.opts.Verbose {
|
||||
c.sendOK()
|
||||
@@ -3102,6 +3107,13 @@ func (c *client) processInboundGatewayMsg(msg []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
acc.stats.Lock()
|
||||
acc.stats.inMsgs++
|
||||
acc.stats.inBytes += int64(size)
|
||||
acc.stats.gw.inMsgs++
|
||||
acc.stats.gw.inBytes += int64(size)
|
||||
acc.stats.Unlock()
|
||||
|
||||
// Check if this is a service reply subject (_R_)
|
||||
noInterest := len(r.psubs) == 0
|
||||
checkNoInterest := true
|
||||
|
||||
+68
-20
@@ -468,6 +468,7 @@ func (js *jetStream) isStreamHealthy(acc *Account, sa *streamAssignment) error {
|
||||
return errors.New("stream not found")
|
||||
}
|
||||
|
||||
msetNode := mset.raftNode()
|
||||
switch {
|
||||
case mset.cfg.Replicas <= 1:
|
||||
return nil // No further checks for R=1 streams
|
||||
@@ -475,10 +476,12 @@ func (js *jetStream) isStreamHealthy(acc *Account, sa *streamAssignment) error {
|
||||
case node == nil:
|
||||
return errors.New("group node missing")
|
||||
|
||||
case node != mset.raftNode():
|
||||
case msetNode == nil:
|
||||
// Can happen when the stream's node is not yet initialized.
|
||||
return errors.New("stream node missing")
|
||||
|
||||
case node != msetNode:
|
||||
s.Warnf("Detected stream cluster node skew '%s > %s'", acc.GetName(), streamName)
|
||||
node.Delete()
|
||||
mset.resetClusteredState(nil)
|
||||
return errors.New("cluster node skew detected")
|
||||
|
||||
case !mset.isMonitorRunning():
|
||||
@@ -521,6 +524,7 @@ func (js *jetStream) isConsumerHealthy(mset *stream, consumer string, ca *consum
|
||||
return errors.New("consumer not found")
|
||||
}
|
||||
|
||||
oNode := o.raftNode()
|
||||
rc, _ := o.replica()
|
||||
switch {
|
||||
case rc <= 1:
|
||||
@@ -529,19 +533,15 @@ func (js *jetStream) isConsumerHealthy(mset *stream, consumer string, ca *consum
|
||||
case node == nil:
|
||||
return errors.New("group node missing")
|
||||
|
||||
case node != o.raftNode():
|
||||
case oNode == nil:
|
||||
// Can happen when the consumer's node is not yet initialized.
|
||||
return errors.New("consumer node missing")
|
||||
|
||||
case node != oNode:
|
||||
mset.mu.RLock()
|
||||
accName, streamName := mset.acc.GetName(), mset.cfg.Name
|
||||
mset.mu.RUnlock()
|
||||
s.Warnf("Detected consumer cluster node skew '%s > %s > %s'", accName, streamName, consumer)
|
||||
node.Delete()
|
||||
o.deleteWithoutAdvisory()
|
||||
|
||||
// When we try to restart we nil out the node and reprocess the consumer assignment.
|
||||
js.mu.Lock()
|
||||
ca.Group.node = nil
|
||||
js.mu.Unlock()
|
||||
js.processConsumerAssignment(ca)
|
||||
return errors.New("cluster node skew detected")
|
||||
|
||||
case !o.isMonitorRunning():
|
||||
@@ -2417,6 +2417,8 @@ func (js *jetStream) monitorStream(mset *stream, sa *streamAssignment, sendSnaps
|
||||
doSnapshot()
|
||||
return
|
||||
case <-mqch:
|
||||
// Clean signal from shutdown routine so do best effort attempt to snapshot.
|
||||
doSnapshot()
|
||||
return
|
||||
case <-qch:
|
||||
// Clean signal from shutdown routine so do best effort attempt to snapshot.
|
||||
@@ -3196,12 +3198,14 @@ func (js *jetStream) applyStreamEntries(mset *stream, ce *CommittedEntry, isReco
|
||||
// Returns the PeerInfo for all replicas of a raft node. This is different than node.Peers()
|
||||
// and is used for external facing advisories.
|
||||
func (s *Server) replicas(node RaftNode) []*PeerInfo {
|
||||
now := time.Now()
|
||||
var replicas []*PeerInfo
|
||||
for _, rp := range node.Peers() {
|
||||
if sir, ok := s.nodeToInfo.Load(rp.ID); ok && sir != nil {
|
||||
si := sir.(nodeInfo)
|
||||
pi := &PeerInfo{Peer: rp.ID, Name: si.name, Current: rp.Current, Active: now.Sub(rp.Last), Offline: si.offline, Lag: rp.Lag}
|
||||
pi := &PeerInfo{Peer: rp.ID, Name: si.name, Current: rp.Current, Offline: si.offline, Lag: rp.Lag}
|
||||
if !rp.Last.IsZero() {
|
||||
pi.Active = time.Since(rp.Last)
|
||||
}
|
||||
replicas = append(replicas, pi)
|
||||
}
|
||||
}
|
||||
@@ -5219,7 +5223,14 @@ func (js *jetStream) processConsumerLeaderChange(o *consumer, isLeader bool) err
|
||||
}
|
||||
|
||||
if isLeader {
|
||||
s.Noticef("JetStream cluster new consumer leader for '%s > %s > %s'", ca.Client.serviceAccount(), streamName, consumerName)
|
||||
// Only log if the consumer is replicated and/or durable.
|
||||
// Logging about R1 ephemerals, like KV watchers, is mostly noise since the leader will always be known.
|
||||
o.mu.RLock()
|
||||
isReplicated, durable := o.node != nil, o.isDurable()
|
||||
o.mu.RUnlock()
|
||||
if isReplicated || durable {
|
||||
s.Noticef("JetStream cluster new consumer leader for '%s > %s > %s'", ca.Client.serviceAccount(), streamName, consumerName)
|
||||
}
|
||||
s.sendConsumerLeaderElectAdvisory(o)
|
||||
} else {
|
||||
// We are stepping down.
|
||||
@@ -8169,8 +8180,15 @@ func (mset *stream) processClusteredInboundMsg(subject, reply string, hdr, msg [
|
||||
// If we are using the system account for NRG, add in the extra sent msgs and bytes to our account
|
||||
// so that the end user / account owner has visibility.
|
||||
if node.IsSystemAccount() && mset.acc != nil && r > 1 {
|
||||
atomic.AddInt64(&mset.acc.outMsgs, int64(r-1))
|
||||
atomic.AddInt64(&mset.acc.outBytes, int64(len(esm)*(r-1)))
|
||||
outMsgs := int64(r - 1)
|
||||
outBytes := int64(len(esm) * (r - 1))
|
||||
|
||||
mset.acc.stats.Lock()
|
||||
mset.acc.stats.outMsgs += outMsgs
|
||||
mset.acc.stats.outBytes += outBytes
|
||||
mset.acc.stats.rt.outMsgs += outMsgs
|
||||
mset.acc.stats.rt.outBytes += outBytes
|
||||
mset.acc.stats.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8575,7 +8593,28 @@ RETRY:
|
||||
// Check for eof signaling.
|
||||
if len(msg) == 0 {
|
||||
msgsQ.recycle(&mrecs)
|
||||
return nil
|
||||
|
||||
// Sanity check that we've received all data expected by the snapshot.
|
||||
mset.mu.RLock()
|
||||
lseq := mset.lseq
|
||||
mset.mu.RUnlock()
|
||||
if lseq >= snap.LastSeq {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Make sure we do not spin and make things worse.
|
||||
const minRetryWait = 2 * time.Second
|
||||
elapsed := time.Since(reqSendTime)
|
||||
if elapsed < minRetryWait {
|
||||
select {
|
||||
case <-s.quitCh:
|
||||
return ErrServerNotRunning
|
||||
case <-qch:
|
||||
return errCatchupStreamStopped
|
||||
case <-time.After(minRetryWait - elapsed):
|
||||
}
|
||||
}
|
||||
goto RETRY
|
||||
}
|
||||
if _, err := mset.processCatchupMsg(msg); err == nil {
|
||||
if mrec.reply != _EMPTY_ {
|
||||
@@ -8791,7 +8830,7 @@ func (js *jetStream) clusterInfo(rg *raftGroup) *ClusterInfo {
|
||||
for _, rp := range peers {
|
||||
if rp.ID != id && rg.isMember(rp.ID) {
|
||||
var lastSeen time.Duration
|
||||
if now.After(rp.Last) && rp.Last.Unix() != 0 {
|
||||
if now.After(rp.Last) && !rp.Last.IsZero() {
|
||||
lastSeen = now.Sub(rp.Last)
|
||||
}
|
||||
current := rp.Current
|
||||
@@ -9079,6 +9118,15 @@ func (mset *stream) runCatchup(sendSubject string, sreq *streamSyncRequest) {
|
||||
// In the latter case the request expects us to have more. Just continue and value availability here.
|
||||
// This should only be possible if the logs have already desynced, and we shouldn't have become leader
|
||||
// in the first place. Not much we can do here in this (hypothetical) scenario.
|
||||
|
||||
// Do another quick sanity check that we actually have enough data to satisfy the request.
|
||||
// If not, let's step down and hope a new leader can correct this.
|
||||
if state.LastSeq < last {
|
||||
s.Warnf("Catchup for stream '%s > %s' skipped, requested sequence %d was larger than current state: %+v",
|
||||
mset.account(), mset.name(), seq, state)
|
||||
node.StepDown()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
mset.setCatchupPeer(sreq.Peer, last-seq)
|
||||
@@ -9198,7 +9246,7 @@ func (mset *stream) runCatchup(sendSubject string, sreq *streamSyncRequest) {
|
||||
// The snapshot has a larger last sequence then we have. This could be due to a truncation
|
||||
// when trying to recover after corruption, still not 100% sure. Could be off by 1 too somehow,
|
||||
// but tested a ton of those with no success.
|
||||
s.Warnf("Catchup for stream '%s > %s' completed, but requested sequence %d was larger then current state: %+v",
|
||||
s.Warnf("Catchup for stream '%s > %s' completed, but requested sequence %d was larger than current state: %+v",
|
||||
mset.account(), mset.name(), seq, state)
|
||||
// Try our best to redo our invalidated snapshot as well.
|
||||
if n := mset.raftNode(); n != nil {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018-2024 The NATS Authors
|
||||
// Copyright 2018-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+57
-3
@@ -1418,7 +1418,7 @@ func (c *client) processLeafnodeInfo(info *Info) {
|
||||
c.setPermissions(perms)
|
||||
}
|
||||
|
||||
var resumeConnect bool
|
||||
var resumeConnect, checkSyncConsumers bool
|
||||
|
||||
// If this is a remote connection and this is the first INFO protocol,
|
||||
// then we need to finish the connect process by sending CONNECT, etc..
|
||||
@@ -1428,6 +1428,7 @@ func (c *client) processLeafnodeInfo(info *Info) {
|
||||
resumeConnect = true
|
||||
} else if !firstINFO && didSolicit {
|
||||
c.leaf.remoteAccName = info.RemoteAccount
|
||||
checkSyncConsumers = info.JetStream
|
||||
}
|
||||
|
||||
// Check if we have the remote account information and if so make sure it's stored.
|
||||
@@ -1446,6 +1447,12 @@ func (c *client) processLeafnodeInfo(info *Info) {
|
||||
if finishConnect {
|
||||
s.leafNodeFinishConnectProcess(c)
|
||||
}
|
||||
|
||||
// If we have JS enabled and so does the other side, we will
|
||||
// check to see if we need to kick any internal source or mirror consumers.
|
||||
if checkSyncConsumers {
|
||||
s.checkInternalSyncConsumers(c.acc, info.Domain)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) negotiateLeafCompression(c *client, didSolicit bool, infoCompression string, co *CompressionOpts) (bool, error) {
|
||||
@@ -1954,11 +1961,12 @@ func (c *client) processLeafNodeConnect(s *Server, arg []byte, lang string) erro
|
||||
// If we received pub deny permissions from the other end, merge with existing ones.
|
||||
c.mergeDenyPermissions(pub, proto.DenyPub)
|
||||
|
||||
acc := c.acc
|
||||
c.mu.Unlock()
|
||||
|
||||
// Register the cluster, even if empty, as long as we are acting as a hub.
|
||||
if !proto.Hub {
|
||||
c.acc.registerLeafNodeCluster(proto.Cluster)
|
||||
acc.registerLeafNodeCluster(proto.Cluster)
|
||||
}
|
||||
|
||||
// Add in the leafnode here since we passed through auth at this point.
|
||||
@@ -1973,12 +1981,58 @@ func (c *client) processLeafNodeConnect(s *Server, arg []byte, lang string) erro
|
||||
s.initLeafNodeSmapAndSendSubs(c)
|
||||
|
||||
// Announce the account connect event for a leaf node.
|
||||
// This will no-op as needed.
|
||||
// This will be a no-op as needed.
|
||||
s.sendLeafNodeConnect(c.acc)
|
||||
|
||||
// If we have JS enabled and so does the other side, we will
|
||||
// check to see if we need to kick any internal source or mirror consumers.
|
||||
if proto.JetStream {
|
||||
s.checkInternalSyncConsumers(acc, proto.Domain)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// checkInternalSyncConsumers
|
||||
func (s *Server) checkInternalSyncConsumers(acc *Account, remoteDomain string) {
|
||||
// Grab our js
|
||||
js := s.getJetStream()
|
||||
|
||||
// Only applicable if we have JS and the leafnode has JS as well.
|
||||
// We check for remote JS outside.
|
||||
if !js.isEnabled() || acc == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// We will check all streams in our local account. They must be a leader and
|
||||
// be sourcing or mirroring. We will check the external config on the stream itself
|
||||
// if this is cross domain, or if the remote domain is empty, meaning we might be
|
||||
// extedning the system across this leafnode connection and hence we would be extending
|
||||
// our own domain.
|
||||
jsa := js.lookupAccount(acc)
|
||||
if jsa == nil {
|
||||
return
|
||||
}
|
||||
var streams []*stream
|
||||
jsa.mu.RLock()
|
||||
for _, mset := range jsa.streams {
|
||||
mset.cfgMu.RLock()
|
||||
// We need to have a mirror or source defined.
|
||||
// We do not want to force another lock here to look for leader status,
|
||||
// so collect and after we release jsa will make sure.
|
||||
if mset.cfg.Mirror != nil || len(mset.cfg.Sources) > 0 {
|
||||
streams = append(streams, mset)
|
||||
}
|
||||
mset.cfgMu.RUnlock()
|
||||
}
|
||||
jsa.mu.RUnlock()
|
||||
|
||||
// Now loop through all candidates and check if we are the leader and have NOT
|
||||
// created the sync up consumer.
|
||||
for _, mset := range streams {
|
||||
mset.retryDisconnectedSyncConsumers(remoteDomain)
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the remote cluster name. This is set only once so does not require a lock.
|
||||
func (c *client) remoteCluster() string {
|
||||
if c.leaf == nil {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+20
-1
@@ -83,6 +83,12 @@ func (ms *memStore) UpdateConfig(cfg *StreamConfig) error {
|
||||
|
||||
ms.mu.Lock()
|
||||
ms.cfg = *cfg
|
||||
// Create or delete the THW if needed.
|
||||
if cfg.AllowMsgTTL && ms.ttls == nil {
|
||||
ms.ttls = thw.NewHashWheel()
|
||||
} else if !cfg.AllowMsgTTL && ms.ttls != nil {
|
||||
ms.ttls = nil
|
||||
}
|
||||
// Limits checks and enforcement.
|
||||
ms.enforceMsgLimit()
|
||||
ms.enforceBytesLimit()
|
||||
@@ -112,7 +118,7 @@ func (ms *memStore) UpdateConfig(cfg *StreamConfig) error {
|
||||
}
|
||||
ms.mu.Unlock()
|
||||
|
||||
if cfg.MaxAge != 0 {
|
||||
if cfg.MaxAge != 0 || cfg.AllowMsgTTL {
|
||||
ms.expireMsgs()
|
||||
}
|
||||
return nil
|
||||
@@ -1463,6 +1469,19 @@ func (ms *memStore) deleteFirstMsg() bool {
|
||||
return ms.removeMsg(ms.state.FirstSeq, false)
|
||||
}
|
||||
|
||||
// SubjectForSeq will return what the subject is for this sequence if found.
|
||||
func (ms *memStore) SubjectForSeq(seq uint64) (string, error) {
|
||||
ms.mu.RLock()
|
||||
defer ms.mu.RUnlock()
|
||||
if seq < ms.state.FirstSeq {
|
||||
return _EMPTY_, ErrStoreMsgNotFound
|
||||
}
|
||||
if sm, ok := ms.msgs[seq]; ok {
|
||||
return sm.subj, nil
|
||||
}
|
||||
return _EMPTY_, ErrStoreMsgNotFound
|
||||
}
|
||||
|
||||
// LoadMsg will lookup the message by sequence number and return it if found.
|
||||
func (ms *memStore) LoadMsg(seq uint64, smp *StoreMsg) (*StoreMsg, error) {
|
||||
return ms.loadMsgLocked(seq, smp, true)
|
||||
|
||||
+6
-3
@@ -23,6 +23,7 @@ import (
|
||||
"encoding/json"
|
||||
"expvar"
|
||||
"fmt"
|
||||
"maps"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -282,7 +283,9 @@ func (s *Server) Connz(opts *ConnzOptions) (*Connz, error) {
|
||||
s.mu.RLock()
|
||||
// Default to all client unless filled in above.
|
||||
if clist == nil {
|
||||
clist = s.clients
|
||||
clist = make(map[uint64]*client, len(s.clients)+len(s.leafs))
|
||||
maps.Copy(clist, s.clients)
|
||||
maps.Copy(clist, s.leafs)
|
||||
}
|
||||
|
||||
// copy the server id for monitoring
|
||||
@@ -4024,8 +4027,8 @@ func (s *Server) Raftz(opts *RaftzOptions) *RaftzStatus {
|
||||
Known: p.kp,
|
||||
LastReplicatedIndex: p.li,
|
||||
}
|
||||
if p.ts > 0 {
|
||||
peer.LastSeen = time.Since(time.Unix(0, p.ts)).String()
|
||||
if !p.ts.IsZero() {
|
||||
peer.LastSeen = time.Since(p.ts).String()
|
||||
}
|
||||
info.Peers[id] = peer
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2013-2023 The NATS Authors
|
||||
// Copyright 2013-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2024 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2024 The NATS Authors
|
||||
// Copyright 2024-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018-2023 The NATS Authors
|
||||
// Copyright 2018-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021-2024 The NATS Authors
|
||||
// Copyright 2021-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023-2024 The NATS Authors
|
||||
// Copyright 2023-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2024 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2021 The NATS Authors
|
||||
// Copyright 2015-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2022 The NATS Authors
|
||||
// Copyright 2015-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -28,6 +28,7 @@ var (
|
||||
lastTotal int64
|
||||
lastSeconds int64
|
||||
ipcpu int64
|
||||
pageSize int64
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -42,6 +43,7 @@ func init() {
|
||||
// Avoiding to generate docker image without CGO
|
||||
ticks = 100 // int64(C.sysconf(C._SC_CLK_TCK))
|
||||
procStatFile = fmt.Sprintf("/proc/%d/stat", os.Getpid())
|
||||
pageSize = int64(os.Getpagesize())
|
||||
periodic()
|
||||
}
|
||||
|
||||
@@ -94,7 +96,7 @@ func ProcUsage(pcpu *float64, rss, vss *int64) error {
|
||||
fields := bytes.Fields(contents)
|
||||
|
||||
// Memory
|
||||
*rss = (parseInt64(fields[rssPos])) << 12
|
||||
*rss = (parseInt64(fields[rssPos])) * pageSize
|
||||
*vss = parseInt64(fields[vssPos])
|
||||
|
||||
// PCPU
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2021 The NATS Authors
|
||||
// Copyright 2015-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2024 The NATS Authors
|
||||
// Copyright 2015-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023 The NATS Authors
|
||||
// Copyright 2023-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+127
-71
@@ -188,7 +188,7 @@ type raft struct {
|
||||
isSysAcc atomic.Bool // Are we utilizing the system account?
|
||||
maybeLeader bool // The group had a preferred leader. And is maybe already acting as leader prior to scale up.
|
||||
|
||||
observer bool // The node is observing, i.e. not participating in voting
|
||||
observer bool // The node is observing, i.e. not able to become leader
|
||||
|
||||
extSt extensionState // Extension state
|
||||
|
||||
@@ -240,9 +240,9 @@ type catchupState struct {
|
||||
|
||||
// lps holds peer state of last time and last index replicated.
|
||||
type lps struct {
|
||||
ts int64 // Last timestamp
|
||||
li uint64 // Last index replicated
|
||||
kp bool // Known peer
|
||||
ts time.Time // Last timestamp
|
||||
li uint64 // Last index replicated
|
||||
kp bool // Known peer
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -502,13 +502,13 @@ func (s *Server) initRaftNode(accName string, cfg *RaftConfig, labels pprofLabel
|
||||
}
|
||||
|
||||
// Make sure to track ourselves.
|
||||
n.peers[n.id] = &lps{time.Now().UnixNano(), 0, true}
|
||||
n.peers[n.id] = &lps{time.Now(), 0, true}
|
||||
|
||||
// Track known peers
|
||||
for _, peer := range ps.knownPeers {
|
||||
if peer != n.id {
|
||||
// Set these to 0 to start but mark as known peer.
|
||||
n.peers[peer] = &lps{0, 0, true}
|
||||
n.peers[peer] = &lps{time.Time{}, 0, true}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1446,9 +1446,8 @@ func (n *raft) isCurrent(includeForwardProgress bool) bool {
|
||||
|
||||
// Check to see that we have heard from the current leader lately.
|
||||
if n.leader != noLeader && n.leader != n.id && n.catchup == nil {
|
||||
okInterval := int64(hbInterval) * 2
|
||||
ts := time.Now().UnixNano()
|
||||
if ps := n.peers[n.leader]; ps == nil || ps.ts == 0 && (ts-ps.ts) > okInterval {
|
||||
okInterval := hbInterval * 2
|
||||
if ps := n.peers[n.leader]; ps == nil || time.Since(ps.ts) > okInterval {
|
||||
n.debug("Not current, no recent leader contact")
|
||||
return false
|
||||
}
|
||||
@@ -1586,14 +1585,12 @@ func (n *raft) StepDown(preferred ...string) error {
|
||||
preferred = nil
|
||||
}
|
||||
|
||||
nowts := time.Now().UnixNano()
|
||||
|
||||
// If we have a preferred check it first.
|
||||
if maybeLeader != noLeader {
|
||||
var isHealthy bool
|
||||
if ps, ok := n.peers[maybeLeader]; ok {
|
||||
si, ok := n.s.nodeToInfo.Load(maybeLeader)
|
||||
isHealthy = ok && !si.(nodeInfo).offline && (nowts-ps.ts) < int64(hbInterval*3)
|
||||
isHealthy = ok && !si.(nodeInfo).offline && time.Since(ps.ts) < hbInterval*3
|
||||
}
|
||||
if !isHealthy {
|
||||
maybeLeader = noLeader
|
||||
@@ -1608,7 +1605,7 @@ func (n *raft) StepDown(preferred ...string) error {
|
||||
continue
|
||||
}
|
||||
si, ok := n.s.nodeToInfo.Load(peer)
|
||||
isHealthy := ok && !si.(nodeInfo).offline && (nowts-ps.ts) < int64(hbInterval*3)
|
||||
isHealthy := ok && !si.(nodeInfo).offline && time.Since(ps.ts) < hbInterval*3
|
||||
if isHealthy {
|
||||
maybeLeader = peer
|
||||
break
|
||||
@@ -1733,7 +1730,7 @@ func (n *raft) Peers() []*Peer {
|
||||
p := &Peer{
|
||||
ID: id,
|
||||
Current: id == n.leader || ps.li >= n.applied,
|
||||
Last: time.Unix(0, ps.ts),
|
||||
Last: ps.ts,
|
||||
Lag: lag,
|
||||
}
|
||||
peers = append(peers, p)
|
||||
@@ -2212,12 +2209,13 @@ var aePool = sync.Pool{
|
||||
// appendEntry is the main struct that is used to sync raft peers.
|
||||
type appendEntry struct {
|
||||
leader string // The leader that this append entry came from.
|
||||
term uint64 // The current term, as the leader understands it.
|
||||
commit uint64 // The commit index, as the leader understands it.
|
||||
term uint64 // The term when this entry was stored.
|
||||
commit uint64 // The commit index of the leader when this append entry was sent.
|
||||
pterm uint64 // The previous term, for checking consistency.
|
||||
pindex uint64 // The previous commit index, for checking consistency.
|
||||
entries []*Entry // Entries to process.
|
||||
// Below fields are for internal use only:
|
||||
lterm uint64 // The highest term for catchups only, as the leader understands it. (If lterm=0, use term instead)
|
||||
reply string // Reply subject to respond to once committed.
|
||||
sub *subscription // The subscription that the append entry came in on.
|
||||
buf []byte
|
||||
@@ -2227,7 +2225,7 @@ type appendEntry struct {
|
||||
func newAppendEntry(leader string, term, commit, pterm, pindex uint64, entries []*Entry) *appendEntry {
|
||||
ae := aePool.Get().(*appendEntry)
|
||||
ae.leader, ae.term, ae.commit, ae.pterm, ae.pindex, ae.entries = leader, term, commit, pterm, pindex, entries
|
||||
ae.reply, ae.sub, ae.buf = _EMPTY_, nil, nil
|
||||
ae.lterm, ae.reply, ae.sub, ae.buf = 0, _EMPTY_, nil, nil
|
||||
return ae
|
||||
}
|
||||
|
||||
@@ -2309,36 +2307,47 @@ func (ae *appendEntry) encode(b []byte) ([]byte, error) {
|
||||
return nil, errTooManyEntries
|
||||
}
|
||||
|
||||
var elen int
|
||||
var elen uint64
|
||||
for _, e := range ae.entries {
|
||||
elen += len(e.Data) + 1 + 4 // 1 is type, 4 is for size.
|
||||
// MaxInt32 instead of MaxUint32 deliberate here to stop int
|
||||
// overflow on 32-bit platforms, still gives us ~2GB limit.
|
||||
ulen := uint64(len(e.Data))
|
||||
if ulen > math.MaxInt32 {
|
||||
return nil, errBadAppendEntry
|
||||
}
|
||||
elen += ulen + 1 + 4 // 1 is type, 4 is for size.
|
||||
}
|
||||
tlen := appendEntryBaseLen + elen + 1
|
||||
// Uvarint for lterm can be a maximum 10 bytes for a uint64.
|
||||
var _lterm [10]byte
|
||||
lterm := _lterm[:binary.PutUvarint(_lterm[:], ae.lterm)]
|
||||
tlen := appendEntryBaseLen + elen + uint64(len(lterm))
|
||||
|
||||
var buf []byte
|
||||
if cap(b) >= tlen {
|
||||
buf = b[:tlen]
|
||||
if uint64(cap(b)) >= tlen {
|
||||
buf = b[:idLen]
|
||||
} else {
|
||||
buf = make([]byte, tlen)
|
||||
buf = make([]byte, idLen, tlen)
|
||||
}
|
||||
|
||||
var le = binary.LittleEndian
|
||||
copy(buf[:idLen], ae.leader)
|
||||
le.PutUint64(buf[8:], ae.term)
|
||||
le.PutUint64(buf[16:], ae.commit)
|
||||
le.PutUint64(buf[24:], ae.pterm)
|
||||
le.PutUint64(buf[32:], ae.pindex)
|
||||
le.PutUint16(buf[40:], uint16(len(ae.entries)))
|
||||
wi := 42
|
||||
buf = le.AppendUint64(buf, ae.term)
|
||||
buf = le.AppendUint64(buf, ae.commit)
|
||||
buf = le.AppendUint64(buf, ae.pterm)
|
||||
buf = le.AppendUint64(buf, ae.pindex)
|
||||
buf = le.AppendUint16(buf, uint16(len(ae.entries)))
|
||||
for _, e := range ae.entries {
|
||||
le.PutUint32(buf[wi:], uint32(len(e.Data)+1))
|
||||
wi += 4
|
||||
buf[wi] = byte(e.Type)
|
||||
wi++
|
||||
copy(buf[wi:], e.Data)
|
||||
wi += len(e.Data)
|
||||
// The +1 is safe here as we've already checked len(e.Data)
|
||||
// is not greater than MaxInt32, which is less than MaxUint32.
|
||||
buf = le.AppendUint32(buf, uint32(1+len(e.Data)))
|
||||
buf = append(buf, byte(e.Type))
|
||||
buf = append(buf, e.Data...)
|
||||
}
|
||||
return buf[:wi], nil
|
||||
// This is safe because old nodes will ignore bytes after the
|
||||
// encoded messages. Nodes that are aware of this will decode
|
||||
// it correctly.
|
||||
buf = append(buf, lterm...)
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
// This can not be used post the wire level callback since we do not copy.
|
||||
@@ -2353,19 +2362,24 @@ func (n *raft) decodeAppendEntry(msg []byte, sub *subscription, reply string) (*
|
||||
ae.reply, ae.sub = reply, sub
|
||||
|
||||
// Decode Entries.
|
||||
ne, ri := int(le.Uint16(msg[40:])), 42
|
||||
for i, max := 0, len(msg); i < ne; i++ {
|
||||
ne, ri := int(le.Uint16(msg[40:])), uint64(42)
|
||||
for i, max := 0, uint64(len(msg)); i < ne; i++ {
|
||||
if ri >= max-1 {
|
||||
return nil, errBadAppendEntry
|
||||
}
|
||||
le := int(le.Uint32(msg[ri:]))
|
||||
ml := uint64(le.Uint32(msg[ri:]))
|
||||
ri += 4
|
||||
if le <= 0 || ri+le > max {
|
||||
if ml <= 0 || ri+ml > max {
|
||||
return nil, errBadAppendEntry
|
||||
}
|
||||
entry := newEntry(EntryType(msg[ri]), msg[ri+1:ri+le])
|
||||
entry := newEntry(EntryType(msg[ri]), msg[ri+1:ri+ml])
|
||||
ae.entries = append(ae.entries, entry)
|
||||
ri += le
|
||||
ri += ml
|
||||
}
|
||||
if len(msg[ri:]) > 0 {
|
||||
if lterm, n := binary.Uvarint(msg[ri:]); n > 0 {
|
||||
ae.lterm = lterm
|
||||
}
|
||||
}
|
||||
ae.buf = msg
|
||||
return ae, nil
|
||||
@@ -2616,11 +2630,10 @@ func (n *raft) Quorum() bool {
|
||||
n.RLock()
|
||||
defer n.RUnlock()
|
||||
|
||||
now, nc := time.Now().UnixNano(), 0
|
||||
nc := 0
|
||||
for id, peer := range n.peers {
|
||||
if id == n.id || time.Duration(now-peer.ts) < lostQuorumInterval {
|
||||
nc++
|
||||
if nc >= n.qn {
|
||||
if id == n.id || time.Since(peer.ts) < lostQuorumInterval {
|
||||
if nc++; nc >= n.qn {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -2642,11 +2655,10 @@ func (n *raft) lostQuorumLocked() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
now, nc := time.Now().UnixNano(), 0
|
||||
nc := 0
|
||||
for id, peer := range n.peers {
|
||||
if id == n.id || time.Duration(now-peer.ts) < lostQuorumInterval {
|
||||
nc++
|
||||
if nc >= n.qn {
|
||||
if id == n.id || time.Since(peer.ts) < lostQuorumInterval {
|
||||
if nc++; nc >= n.qn {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -2679,7 +2691,7 @@ func (n *raft) loadFirstEntry() (ae *appendEntry, err error) {
|
||||
func (n *raft) runCatchup(ar *appendEntryResponse, indexUpdatesQ *ipQueue[uint64]) {
|
||||
n.RLock()
|
||||
s, reply := n.s, n.areply
|
||||
peer, subj, last := ar.peer, ar.reply, n.pindex
|
||||
peer, subj, term, last := ar.peer, ar.reply, n.term, n.pindex
|
||||
n.RUnlock()
|
||||
|
||||
defer s.grWG.Done()
|
||||
@@ -2719,6 +2731,14 @@ func (n *raft) runCatchup(ar *appendEntryResponse, indexUpdatesQ *ipQueue[uint64
|
||||
}
|
||||
return true
|
||||
}
|
||||
// Re-encode with the lterm if needed
|
||||
if ae.lterm != term {
|
||||
ae.lterm = term
|
||||
if ae.buf, err = ae.encode(ae.buf[:0]); err != nil {
|
||||
n.warn("Got an error re-encoding append entry: %v", err)
|
||||
return true
|
||||
}
|
||||
}
|
||||
// Update our tracking total.
|
||||
om[next] = len(ae.buf)
|
||||
total += len(ae.buf)
|
||||
@@ -2954,7 +2974,7 @@ func (n *raft) applyCommit(index uint64) error {
|
||||
|
||||
if lp, ok := n.peers[newPeer]; !ok {
|
||||
// We are not tracking this one automatically so we need to bump cluster size.
|
||||
n.peers[newPeer] = &lps{time.Now().UnixNano(), 0, true}
|
||||
n.peers[newPeer] = &lps{time.Now(), 0, true}
|
||||
} else {
|
||||
// Mark as added.
|
||||
lp.kp = true
|
||||
@@ -3015,6 +3035,12 @@ func (n *raft) trackResponse(ar *appendEntryResponse) {
|
||||
|
||||
n.Lock()
|
||||
|
||||
// Check state under lock, we might not be leader anymore.
|
||||
if n.State() != Leader {
|
||||
n.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
// Update peer's last index.
|
||||
if ps := n.peers[ar.peer]; ps != nil && ar.index > ps.li {
|
||||
ps.li = ar.index
|
||||
@@ -3104,9 +3130,9 @@ func (n *raft) trackPeer(peer string) error {
|
||||
}
|
||||
}
|
||||
if ps := n.peers[peer]; ps != nil {
|
||||
ps.ts = time.Now().UnixNano()
|
||||
ps.ts = time.Now()
|
||||
} else if !isRemoved {
|
||||
n.peers[peer] = &lps{time.Now().UnixNano(), 0, false}
|
||||
n.peers[peer] = &lps{time.Now(), 0, false}
|
||||
}
|
||||
n.Unlock()
|
||||
|
||||
@@ -3190,7 +3216,7 @@ func (n *raft) runAsCandidate() {
|
||||
|
||||
// handleAppendEntry handles an append entry from the wire. This function
|
||||
// is an internal callback from the "asubj" append entry subscription.
|
||||
func (n *raft) handleAppendEntry(sub *subscription, c *client, _ *Account, subject, reply string, msg []byte) {
|
||||
func (n *raft) handleAppendEntry(sub *subscription, c *client, _ *Account, _, reply string, msg []byte) {
|
||||
msg = copyBytes(msg)
|
||||
if ae, err := n.decodeAppendEntry(msg, sub, reply); err == nil {
|
||||
// Push to the new entry channel. From here one of the worker
|
||||
@@ -3259,7 +3285,11 @@ func (n *raft) truncateWAL(term, index uint64) {
|
||||
n.debug("Truncating and repairing WAL to Term %d Index %d", term, index)
|
||||
|
||||
if term == 0 && index == 0 {
|
||||
n.warn("Resetting WAL state")
|
||||
if n.commit > 0 {
|
||||
n.warn("Resetting WAL state")
|
||||
} else {
|
||||
n.debug("Clearing WAL state (no commits)")
|
||||
}
|
||||
}
|
||||
|
||||
defer func() {
|
||||
@@ -3397,9 +3427,9 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
|
||||
// Track leader directly
|
||||
if isNew && ae.leader != noLeader {
|
||||
if ps := n.peers[ae.leader]; ps != nil {
|
||||
ps.ts = time.Now().UnixNano()
|
||||
ps.ts = time.Now()
|
||||
} else {
|
||||
n.peers[ae.leader] = &lps{time.Now().UnixNano(), 0, true}
|
||||
n.peers[ae.leader] = &lps{time.Now(), 0, true}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3412,12 +3442,13 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
|
||||
}
|
||||
|
||||
// Check state if we are catching up.
|
||||
var resetCatchingUp bool
|
||||
if catchingUp {
|
||||
if cs := n.catchup; cs != nil && n.pterm >= cs.cterm && n.pindex >= cs.cindex {
|
||||
// If we are here we are good, so if we have a catchup pending we can cancel.
|
||||
n.cancelCatchup()
|
||||
// Reset our notion of catching up.
|
||||
catchingUp = false
|
||||
resetCatchingUp = true
|
||||
} else if isNew {
|
||||
var ar *appendEntryResponse
|
||||
var inbox string
|
||||
@@ -3437,9 +3468,17 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
|
||||
}
|
||||
}
|
||||
|
||||
// Grab term from append entry. But if leader explicitly defined its term, use that instead.
|
||||
// This is required during catchup if the leader catches us up on older items from previous terms.
|
||||
// While still allowing us to confirm they're matching our highest known term.
|
||||
lterm := ae.term
|
||||
if ae.lterm != 0 {
|
||||
lterm = ae.lterm
|
||||
}
|
||||
|
||||
// If this term is greater than ours.
|
||||
if ae.term > n.term {
|
||||
n.term = ae.term
|
||||
if lterm > n.term {
|
||||
n.term = lterm
|
||||
n.vote = noVote
|
||||
if isNew {
|
||||
n.writeTermVote()
|
||||
@@ -3448,8 +3487,11 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
|
||||
n.debug("Term higher than ours and we are not a follower: %v, stepping down to %q", n.State(), ae.leader)
|
||||
n.stepdownLocked(ae.leader)
|
||||
}
|
||||
} else if ae.term < n.term && !catchingUp && isNew {
|
||||
n.debug("Rejected AppendEntry from a leader (%s) with term %d which is less than ours", ae.leader, ae.term)
|
||||
} else if lterm < n.term && sub != nil && !(catchingUp && ae.lterm == 0) {
|
||||
// Anything that's below our expected highest term needs to be rejected.
|
||||
// Unless we're replaying (sub=nil), in which case we'll always continue.
|
||||
// For backward-compatibility we shouldn't reject if we're being caught up by an old server.
|
||||
n.debug("Rejected AppendEntry from a leader (%s) with term %d which is less than ours", ae.leader, lterm)
|
||||
ar := newAppendEntryResponse(n.term, n.pindex, n.id, false)
|
||||
n.Unlock()
|
||||
n.sendRPC(ae.reply, _EMPTY_, ar.encode(arbuf))
|
||||
@@ -3457,6 +3499,11 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
|
||||
return
|
||||
}
|
||||
|
||||
// Reset after checking the term is correct, because we use catchingUp in a condition above.
|
||||
if resetCatchingUp {
|
||||
catchingUp = false
|
||||
}
|
||||
|
||||
if isNew && n.leader != ae.leader && n.State() == Follower {
|
||||
n.debug("AppendEntry updating leader to %q", ae.leader)
|
||||
n.updateLeader(ae.leader)
|
||||
@@ -3643,9 +3690,9 @@ CONTINUE:
|
||||
if newPeer := string(e.Data); len(newPeer) == idLen {
|
||||
// Track directly, but wait for commit to be official
|
||||
if ps := n.peers[newPeer]; ps != nil {
|
||||
ps.ts = time.Now().UnixNano()
|
||||
ps.ts = time.Now()
|
||||
} else {
|
||||
n.peers[newPeer] = &lps{time.Now().UnixNano(), 0, false}
|
||||
n.peers[newPeer] = &lps{time.Now(), 0, false}
|
||||
}
|
||||
// Store our peer in our global peer map for all peers.
|
||||
peers.LoadOrStore(newPeer, newPeer)
|
||||
@@ -3671,8 +3718,10 @@ CONTINUE:
|
||||
}
|
||||
}
|
||||
|
||||
// Only ever respond to new entries.
|
||||
// Never respond to catchup messages, because providing quorum based on this is unsafe.
|
||||
var ar *appendEntryResponse
|
||||
if sub != nil {
|
||||
if sub != nil && isNew {
|
||||
ar = newAppendEntryResponse(n.pterm, n.pindex, n.id, true)
|
||||
}
|
||||
n.Unlock()
|
||||
@@ -3700,7 +3749,7 @@ func (n *raft) processPeerState(ps *peerState) {
|
||||
lp.kp = true
|
||||
n.peers[peer] = lp
|
||||
} else {
|
||||
n.peers[peer] = &lps{0, 0, true}
|
||||
n.peers[peer] = &lps{time.Time{}, 0, true}
|
||||
}
|
||||
}
|
||||
n.debug("Update peers from leader to %+v", n.peers)
|
||||
@@ -3715,11 +3764,19 @@ func (n *raft) processAppendEntryResponse(ar *appendEntryResponse) {
|
||||
|
||||
if ar.success {
|
||||
// The remote node successfully committed the append entry.
|
||||
// They agree with our leadership and are happy with the state of the log.
|
||||
// In this case ar.term doesn't matter.
|
||||
n.trackResponse(ar)
|
||||
arPool.Put(ar)
|
||||
} else if ar.reply != _EMPTY_ {
|
||||
// The remote node didn't commit the append entry, and they believe they
|
||||
// are behind and have specified a reply subject, so let's try to catch them up.
|
||||
// In this case ar.term was populated with the remote's pterm.
|
||||
n.catchupFollower(ar)
|
||||
} else if ar.term > n.term {
|
||||
// The remote node didn't commit the append entry, it looks like
|
||||
// they are on a newer term than we are. Step down.
|
||||
// In this case ar.term was populated with the remote's term.
|
||||
n.Lock()
|
||||
n.term = ar.term
|
||||
n.vote = noVote
|
||||
@@ -3728,10 +3785,9 @@ func (n *raft) processAppendEntryResponse(ar *appendEntryResponse) {
|
||||
n.stepdownLocked(noLeader)
|
||||
n.Unlock()
|
||||
arPool.Put(ar)
|
||||
} else if ar.reply != _EMPTY_ {
|
||||
// The remote node didn't commit the append entry and they are
|
||||
// still on the same term, so let's try to catch them up.
|
||||
n.catchupFollower(ar)
|
||||
} else {
|
||||
// Ignore, but return back to pool.
|
||||
arPool.Put(ar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021-2021 The NATS Authors
|
||||
// Copyright 2021-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2024 The NATS Authors
|
||||
// Copyright 2017-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018-2020 The NATS Authors
|
||||
// Copyright 2018-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+9
-1
@@ -449,7 +449,8 @@ func (c *client) processInboundRoutedMsg(msg []byte) {
|
||||
// Update statistics
|
||||
c.in.msgs++
|
||||
// The msg includes the CR_LF, so pull back out for accounting.
|
||||
c.in.bytes += int32(len(msg) - LEN_CR_LF)
|
||||
size := len(msg) - LEN_CR_LF
|
||||
c.in.bytes += int32(size)
|
||||
|
||||
if c.opts.Verbose {
|
||||
c.sendOK()
|
||||
@@ -472,6 +473,13 @@ func (c *client) processInboundRoutedMsg(msg []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
acc.stats.Lock()
|
||||
acc.stats.inMsgs++
|
||||
acc.stats.inBytes += int64(size)
|
||||
acc.stats.rt.inMsgs++
|
||||
acc.stats.rt.inBytes += int64(size)
|
||||
acc.stats.Unlock()
|
||||
|
||||
// Check for no interest, short circuit if so.
|
||||
// This is the fanout scale.
|
||||
if len(r.psubs)+len(r.qsubs) > 0 {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2020-2024 The NATS Authors
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
-1
@@ -389,7 +389,6 @@ type nodeInfo struct {
|
||||
accountNRG bool
|
||||
}
|
||||
|
||||
// Make sure all are 64bits for atomic use
|
||||
type stats struct {
|
||||
inMsgs int64
|
||||
outMsgs int64
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2021 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2022 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2012-2023 The NATS Authors
|
||||
// Copyright 2012-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
@@ -112,6 +112,7 @@ type StreamStore interface {
|
||||
SubjectsTotals(filterSubject string) map[string]uint64
|
||||
AllLastSeqs() ([]uint64, error)
|
||||
MultiLastSeqs(filters []string, maxSeq uint64, maxAllowed int) ([]uint64, error)
|
||||
SubjectForSeq(seq uint64) (string, error)
|
||||
NumPending(sseq uint64, filter string, lastPerSubject bool) (total, validThrough uint64)
|
||||
NumPendingMulti(sseq uint64, sl *Sublist, lastPerSubject bool) (total, validThrough uint64)
|
||||
State() StreamState
|
||||
|
||||
+94
-34
@@ -25,6 +25,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -256,12 +257,20 @@ type StreamSource struct {
|
||||
iname string // For indexing when stream names are the same for multiple sources.
|
||||
}
|
||||
|
||||
// ExternalStream allows you to qualify access to a stream source in another account.
|
||||
// ExternalStream allows you to qualify access to a stream source in another account or domain.
|
||||
type ExternalStream struct {
|
||||
ApiPrefix string `json:"api"`
|
||||
DeliverPrefix string `json:"deliver"`
|
||||
}
|
||||
|
||||
// Will return the domain for this external stream.
|
||||
func (ext *ExternalStream) Domain() string {
|
||||
if ext == nil || ext.ApiPrefix == _EMPTY_ {
|
||||
return _EMPTY_
|
||||
}
|
||||
return tokenAt(ext.ApiPrefix, 2)
|
||||
}
|
||||
|
||||
// For managing stream ingest.
|
||||
const (
|
||||
streamDefaultMaxQueueMsgs = 10_000
|
||||
@@ -534,8 +543,12 @@ func (a *Account) addStreamWithAssignment(config *StreamConfig, fsConfig *FileSt
|
||||
s.setIndexName()
|
||||
}
|
||||
|
||||
// Hold lock, because we'll be reading from and writing to a shared object.
|
||||
js.mu.Lock()
|
||||
copyStreamMetadata(cfg, &ocfg)
|
||||
if reflect.DeepEqual(cfg, &ocfg) {
|
||||
deepEqual := reflect.DeepEqual(cfg, &ocfg)
|
||||
js.mu.Unlock()
|
||||
if deepEqual {
|
||||
if sa != nil {
|
||||
mset.setStreamAssignment(sa)
|
||||
}
|
||||
@@ -2164,7 +2177,7 @@ func (mset *stream) updateWithAdvisory(config *StreamConfig, sendAdvisory bool,
|
||||
|
||||
// If we're changing retention and haven't errored because of consumer
|
||||
// replicas by now, whip through and update the consumer retention.
|
||||
if ocfg.Retention != cfg.Retention && cfg.Retention == InterestPolicy {
|
||||
if ocfg.Retention != cfg.Retention {
|
||||
toUpdate := make([]*consumer, 0, len(mset.consumers))
|
||||
for _, c := range mset.consumers {
|
||||
toUpdate = append(toUpdate, c)
|
||||
@@ -2267,8 +2280,12 @@ func (mset *stream) purge(preq *JSApiStreamPurgeRequest) (purged uint64, err err
|
||||
fseq = ss.First
|
||||
}
|
||||
|
||||
// Take a copy of cList to avoid o.purge() potentially taking the stream lock and
|
||||
// violating the lock ordering.
|
||||
mset.clsMu.RLock()
|
||||
for _, o := range mset.cList {
|
||||
cList := slices.Clone(mset.cList)
|
||||
mset.clsMu.RUnlock()
|
||||
for _, o := range cList {
|
||||
start := fseq
|
||||
o.mu.RLock()
|
||||
// we update consumer sequences if:
|
||||
@@ -2290,7 +2307,6 @@ func (mset *stream) purge(preq *JSApiStreamPurgeRequest) (purged uint64, err err
|
||||
o.purge(start, lseq, isWider)
|
||||
}
|
||||
}
|
||||
mset.clsMu.RUnlock()
|
||||
|
||||
return purged, nil
|
||||
}
|
||||
@@ -2333,14 +2349,15 @@ func (mset *stream) eraseMsg(seq uint64) (bool, error) {
|
||||
|
||||
// Are we a mirror?
|
||||
func (mset *stream) isMirror() bool {
|
||||
mset.mu.RLock()
|
||||
defer mset.mu.RUnlock()
|
||||
mset.cfgMu.RLock()
|
||||
defer mset.cfgMu.RUnlock()
|
||||
return mset.cfg.Mirror != nil
|
||||
}
|
||||
|
||||
func (mset *stream) sourcesInfo() (sis []*StreamSourceInfo) {
|
||||
mset.mu.RLock()
|
||||
defer mset.mu.RUnlock()
|
||||
sis = make([]*StreamSourceInfo, 0, len(mset.sources))
|
||||
for _, si := range mset.sources {
|
||||
sis = append(sis, mset.sourceInfo(si))
|
||||
}
|
||||
@@ -2357,7 +2374,7 @@ func (mset *stream) sourceInfo(si *sourceInfo) *StreamSourceInfo {
|
||||
|
||||
trConfigs := make([]SubjectTransformConfig, len(si.sfs))
|
||||
for i := range si.sfs {
|
||||
destination := _EMPTY_
|
||||
var destination string
|
||||
if si.trs[i] != nil {
|
||||
destination = si.trs[i].dest
|
||||
}
|
||||
@@ -2395,6 +2412,40 @@ func (mset *stream) mirrorInfo() *StreamSourceInfo {
|
||||
return mset.sourceInfo(mset.mirror)
|
||||
}
|
||||
|
||||
// retryDisconnectedSyncConsumers() will check if we have any disconnected
|
||||
// sync consumers for either mirror or a source and will reset and retry to connect.
|
||||
func (mset *stream) retryDisconnectedSyncConsumers(remoteDomain string) {
|
||||
mset.mu.Lock()
|
||||
defer mset.mu.Unlock()
|
||||
|
||||
// Only applicable if we are the stream leader.
|
||||
if !mset.isLeader() {
|
||||
return
|
||||
}
|
||||
|
||||
// Check mirrors first.
|
||||
if si := mset.mirror; si != nil {
|
||||
if si.sub == nil && !si.sip {
|
||||
if remoteDomain == _EMPTY_ || (mset.cfg.Mirror != nil && mset.cfg.Mirror.External.Domain() == remoteDomain) {
|
||||
// Need to reset
|
||||
si.fails = 0
|
||||
mset.cancelSourceInfo(si)
|
||||
mset.scheduleSetupMirrorConsumerRetry()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, si := range mset.sources {
|
||||
ss := mset.streamSource(si.iname)
|
||||
if remoteDomain == _EMPTY_ || (ss != nil && ss.External.Domain() == remoteDomain) {
|
||||
// Need to reset
|
||||
si.fails = 0
|
||||
mset.cancelSourceInfo(si)
|
||||
mset.setupSourceConsumer(si.iname, si.sseq+1, time.Time{})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
// Our consumer HB interval.
|
||||
sourceHealthHB = 1 * time.Second
|
||||
@@ -2956,6 +3007,10 @@ func (mset *stream) setupMirrorConsumer() error {
|
||||
msgs := mirror.msgs
|
||||
sub, err := mset.subscribeInternal(deliverSubject, func(sub *subscription, c *client, _ *Account, subject, reply string, rmsg []byte) {
|
||||
hdr, msg := c.msgParts(copyBytes(rmsg)) // Need to copy.
|
||||
if len(hdr) > 0 {
|
||||
// Remove any Nats-Expected- headers as we don't want to validate them.
|
||||
hdr = removeHeaderIfPrefixPresent(hdr, "Nats-Expected-")
|
||||
}
|
||||
mset.queueInbound(msgs, subject, reply, hdr, msg, nil, nil)
|
||||
mirror.last.Store(time.Now().UnixNano())
|
||||
})
|
||||
@@ -4398,10 +4453,11 @@ func (mset *stream) queueInbound(ib *ipQueue[*inMsg], subj, rply string, hdr, ms
|
||||
im.subj, im.rply, im.hdr, im.msg, im.si, im.mt = subj, rply, hdr, msg, si, mt
|
||||
if _, err := ib.push(im); err != nil {
|
||||
im.returnToPool()
|
||||
mset.srv.RateLimitWarnf("Dropping messages due to excessive stream ingest rate on '%s' > '%s': %s", mset.acc.Name, mset.name(), err)
|
||||
streamName := mset.cfg.Name
|
||||
mset.srv.RateLimitWarnf("Dropping messages due to excessive stream ingest rate on '%s' > '%s': %s", mset.acc.Name, streamName, err)
|
||||
if rply != _EMPTY_ {
|
||||
hdr := []byte("NATS/1.0 429 Too Many Requests\r\n\r\n")
|
||||
b, _ := json.Marshal(&JSPubAckResponse{PubAck: &PubAck{Stream: mset.cfg.Name}, Error: NewJSStreamTooManyRequestsError()})
|
||||
b, _ := json.Marshal(&JSPubAckResponse{PubAck: &PubAck{Stream: streamName}, Error: NewJSStreamTooManyRequestsError()})
|
||||
mset.outq.send(newJSPubMsg(rply, _EMPTY_, _EMPTY_, hdr, b, nil, 0))
|
||||
}
|
||||
}
|
||||
@@ -4863,30 +4919,34 @@ func (mset *stream) processJetStreamMsg(subject, reply string, hdr, msg []byte,
|
||||
}
|
||||
|
||||
// For clustering the lower layers will pass our expected lseq. If it is present check for that here.
|
||||
if lseq > 0 && lseq != (mset.lseq+mset.clfs) {
|
||||
isMisMatch := true
|
||||
// We may be able to recover here if we have no state whatsoever, or we are a mirror.
|
||||
// See if we have to adjust our starting sequence.
|
||||
if mset.lseq == 0 || mset.cfg.Mirror != nil {
|
||||
var state StreamState
|
||||
mset.store.FastState(&state)
|
||||
if state.FirstSeq == 0 {
|
||||
mset.store.Compact(lseq + 1)
|
||||
mset.lseq = lseq
|
||||
isMisMatch = false
|
||||
var clfs uint64
|
||||
if lseq > 0 {
|
||||
clfs = mset.getCLFS()
|
||||
if lseq != (mset.lseq + clfs) {
|
||||
isMisMatch := true
|
||||
// We may be able to recover here if we have no state whatsoever, or we are a mirror.
|
||||
// See if we have to adjust our starting sequence.
|
||||
if mset.lseq == 0 || mset.cfg.Mirror != nil {
|
||||
var state StreamState
|
||||
mset.store.FastState(&state)
|
||||
if state.FirstSeq == 0 {
|
||||
mset.store.Compact(lseq + 1)
|
||||
mset.lseq = lseq
|
||||
isMisMatch = false
|
||||
}
|
||||
}
|
||||
}
|
||||
// Really is a mismatch.
|
||||
if isMisMatch {
|
||||
outq := mset.outq
|
||||
mset.mu.Unlock()
|
||||
if canRespond && outq != nil {
|
||||
resp.PubAck = &PubAck{Stream: name}
|
||||
resp.Error = ApiErrors[JSStreamSequenceNotMatchErr]
|
||||
b, _ := json.Marshal(resp)
|
||||
outq.sendMsg(reply, b)
|
||||
// Really is a mismatch.
|
||||
if isMisMatch {
|
||||
outq := mset.outq
|
||||
mset.mu.Unlock()
|
||||
if canRespond && outq != nil {
|
||||
resp.PubAck = &PubAck{Stream: name}
|
||||
resp.Error = ApiErrors[JSStreamSequenceNotMatchErr]
|
||||
b, _ := json.Marshal(resp)
|
||||
outq.sendMsg(reply, b)
|
||||
}
|
||||
return errLastSeqMismatch
|
||||
}
|
||||
return errLastSeqMismatch
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5150,7 +5210,6 @@ func (mset *stream) processJetStreamMsg(subject, reply string, hdr, msg []byte,
|
||||
// Assume this will succeed.
|
||||
olmsgId := mset.lmsgId
|
||||
mset.lmsgId = msgId
|
||||
clfs := mset.clfs
|
||||
mset.lseq++
|
||||
tierName := mset.tier
|
||||
|
||||
@@ -5783,7 +5842,8 @@ func (mset *stream) stop(deleteFlag, advisory bool) error {
|
||||
if deleteFlag {
|
||||
n.Delete()
|
||||
sa = mset.sa
|
||||
} else {
|
||||
} else if !isShuttingDown {
|
||||
// Stop Raft, unless JetStream is already shutting down, in which case they'll be stopped separately.
|
||||
n.Stop()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023-2024 The NATS Authors
|
||||
// Copyright 2023-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -428,7 +428,7 @@ func (t *SubjectTree[T]) iter(n node, pre []byte, ordered bool, cb func(subject
|
||||
// aggressively optimize against repeated walks, but is considerably faster
|
||||
// in most cases than intersecting against a potentially large sublist.
|
||||
func LazyIntersect[TL, TR any](tl *SubjectTree[TL], tr *SubjectTree[TR], cb func([]byte, *TL, *TR)) {
|
||||
if tl.root == nil || tr.root == nil {
|
||||
if tl == nil || tr == nil || tl.root == nil || tr.root == nil {
|
||||
return
|
||||
}
|
||||
// Iterate over the smaller tree to reduce the number of rounds.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2023-2024 The NATS Authors
|
||||
// Copyright 2023-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2021 The NATS Authors
|
||||
// Copyright 2019-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2021 The NATS Authors
|
||||
// Copyright 2019-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2021 The NATS Authors
|
||||
// Copyright 2019-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2024 The NATS Authors
|
||||
// Copyright 2019-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022-2023 The NATS Authors
|
||||
// Copyright 2022-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2024 The NATS Authors
|
||||
// Copyright 2019-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
Generated
Vendored
+24
@@ -38,6 +38,7 @@ import (
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
|
||||
"github.com/iancoleman/strcase"
|
||||
"github.com/opencloud-eu/opencloud/services/thumbnails/pkg/thumbnail"
|
||||
"github.com/opencloud-eu/reva/v2/internal/grpc/services/storageprovider"
|
||||
"github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/config"
|
||||
"github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/errors"
|
||||
@@ -1287,6 +1288,13 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
|
||||
appendMetadataProp(k, "oc", "photo", "libre.graph.photo", photoKeys)
|
||||
}
|
||||
|
||||
if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
|
||||
// directories have no preview
|
||||
appendToNotFound(prop.NotFound("oc:has-preview"))
|
||||
} else if md.MimeType != "" {
|
||||
hasPreview(md, appendToOK)
|
||||
}
|
||||
|
||||
// ls do not report any properties as missing by default
|
||||
if ls == nil {
|
||||
// favorites from arbitrary metadata
|
||||
@@ -1589,6 +1597,13 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
|
||||
// see https://doc.owncloud.com/server/admin_manual/configuration/server/occ_command.html#maintenance-commands
|
||||
// TODO(jfd): double check the client behavior with reva on backup restore
|
||||
fallthrough
|
||||
case "has-preview":
|
||||
if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
|
||||
// directories have no preview
|
||||
appendToNotFound(prop.NotFound("oc:has-preview"))
|
||||
} else if md.MimeType != "" {
|
||||
hasPreview(md, appendToOK)
|
||||
}
|
||||
default:
|
||||
appendToNotFound(prop.NotFound("oc:" + pf.Prop[i].Local))
|
||||
}
|
||||
@@ -1714,6 +1729,15 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
|
||||
return &response, nil
|
||||
}
|
||||
|
||||
func hasPreview(md *provider.ResourceInfo, appendToOK func(p ...prop.PropertyXML)) {
|
||||
_, match := thumbnail.SupportedMimeTypes[md.MimeType]
|
||||
if match {
|
||||
appendToOK(prop.Escaped("oc:has-preview", "1"))
|
||||
} else {
|
||||
appendToOK(prop.Escaped("oc:has-preview", "0"))
|
||||
}
|
||||
}
|
||||
|
||||
func activeLocks(log *zerolog.Logger, lock *provider.Lock) string {
|
||||
if lock == nil || lock.Type == provider.LockType_LOCK_TYPE_INVALID {
|
||||
return ""
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -125,7 +125,7 @@ func (h *appsHandler) webappTemplate(ctx context.Context, id *ocmpb.ShareId) (st
|
||||
return "", errtypes.BadRequest("share does not contain webapp protocol")
|
||||
}
|
||||
|
||||
return webapp.UriTemplate, nil
|
||||
return webapp.Uri, nil
|
||||
}
|
||||
|
||||
func getWebappProtocol(protocols []*ocmpb.Protocol) (*ocmpb.WebappProtocol, bool) {
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ func NewWebappProtocol(uriTemplate string, viewMode appprovider.ViewMode) *ocm.P
|
||||
return &ocm.Protocol{
|
||||
Term: &ocm.Protocol_WebappOptions{
|
||||
WebappOptions: &ocm.WebappProtocol{
|
||||
UriTemplate: uriTemplate,
|
||||
ViewMode: viewMode,
|
||||
Uri: uriTemplate,
|
||||
ViewMode: viewMode,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
+6
@@ -42,6 +42,12 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if log == nil {
|
||||
log = &zerolog.Logger{}
|
||||
}
|
||||
decomposedLog := log.With().Str("driver", "decomposed").Logger()
|
||||
log = &decomposedLog
|
||||
|
||||
bs, err := blobstore.New(path.Join(o.Root))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Generated
Vendored
+6
@@ -41,6 +41,12 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if log == nil {
|
||||
log = &zerolog.Logger{}
|
||||
}
|
||||
decomposeds3Log := log.With().Str("driver", "decomposeds3").Logger()
|
||||
log = &decomposeds3Log
|
||||
|
||||
if !o.S3ConfigComplete() {
|
||||
return nil, fmt.Errorf("S3 configuration incomplete")
|
||||
}
|
||||
|
||||
+6
@@ -69,6 +69,12 @@ func New(m map[string]interface{}, stream events.Stream, log *zerolog.Logger) (s
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if log == nil {
|
||||
log = &zerolog.Logger{}
|
||||
}
|
||||
posixLog := log.With().Str("driver", "posix").Logger()
|
||||
log = &posixLog
|
||||
|
||||
fs := &posixFS{}
|
||||
var um usermapper.Mapper
|
||||
if o.UseSpaceGroups {
|
||||
|
||||
+53
-28
@@ -109,15 +109,15 @@ func (d *ScanDebouncer) Debounce(item scanItem) {
|
||||
defer d.mutex.Unlock()
|
||||
|
||||
path := item.Path
|
||||
force := item.ForceRescan
|
||||
recurse := item.Recurse
|
||||
if i, ok := d.pending.Load(item.Path); ok {
|
||||
AssimilationPendingTasks.Dec()
|
||||
queueItem := i.(*queueItem)
|
||||
force = force || queueItem.item.ForceRescan
|
||||
recurse = recurse || queueItem.item.Recurse
|
||||
queueItem.timer.Stop()
|
||||
}
|
||||
|
||||
AssimilationPendingTasks.Inc()
|
||||
d.pending.Store(item.Path, &queueItem{
|
||||
item: item,
|
||||
timer: time.AfterFunc(d.after, func() {
|
||||
@@ -132,13 +132,13 @@ func (d *ScanDebouncer) Debounce(item scanItem) {
|
||||
return
|
||||
}
|
||||
|
||||
AssimilationPendingTasks.Dec()
|
||||
d.pending.Delete(path)
|
||||
d.inProgress.Store(path, true)
|
||||
defer d.inProgress.Delete(path)
|
||||
d.f(scanItem{
|
||||
Path: path,
|
||||
ForceRescan: force,
|
||||
Recurse: recurse,
|
||||
Path: path,
|
||||
Recurse: recurse,
|
||||
})
|
||||
}),
|
||||
})
|
||||
@@ -156,6 +156,15 @@ func (d *ScanDebouncer) InProgress(path string) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
// Pending returns true if the given path is currently pending to be processed
|
||||
func (d *ScanDebouncer) Pending(path string) bool {
|
||||
d.mutex.Lock()
|
||||
defer d.mutex.Unlock()
|
||||
|
||||
_, ok := d.pending.Load(path)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (t *Tree) workScanQueue() {
|
||||
for i := 0; i < t.options.MaxConcurrency; i++ {
|
||||
go func() {
|
||||
@@ -189,19 +198,18 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
// 1. New file (could be emitted as part of a new directory)
|
||||
// -> assimilate file
|
||||
// -> scan parent directory recursively to update tree size and catch nodes that weren't covered by an event
|
||||
if !t.scanDebouncer.InProgress(filepath.Dir(path)) {
|
||||
AssimilationCounter.WithLabelValues(_labelFile, _labelAdded).Inc()
|
||||
if !t.scanDebouncer.Pending(filepath.Dir(path)) {
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: path,
|
||||
ForceRescan: false,
|
||||
Path: path,
|
||||
})
|
||||
}
|
||||
if err := t.setDirty(filepath.Dir(path), true); err != nil {
|
||||
t.log.Error().Err(err).Str("path", path).Bool("isDir", isDir).Msg("failed to mark directory as dirty")
|
||||
}
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: filepath.Dir(path),
|
||||
ForceRescan: true,
|
||||
Recurse: true,
|
||||
Path: filepath.Dir(path),
|
||||
Recurse: true,
|
||||
})
|
||||
} else {
|
||||
// 2. New directory
|
||||
@@ -209,10 +217,10 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
if err := t.setDirty(path, true); err != nil {
|
||||
t.log.Error().Err(err).Str("path", path).Bool("isDir", isDir).Msg("failed to mark directory as dirty")
|
||||
}
|
||||
AssimilationCounter.WithLabelValues(_labelDir, _labelAdded).Inc()
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: path,
|
||||
ForceRescan: true,
|
||||
Recurse: true,
|
||||
Path: path,
|
||||
Recurse: true,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -222,11 +230,16 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
// -> update file unless parent directory is being rescanned
|
||||
if !t.scanDebouncer.InProgress(filepath.Dir(path)) {
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: path,
|
||||
ForceRescan: true,
|
||||
Path: path,
|
||||
})
|
||||
}
|
||||
|
||||
if !isDir {
|
||||
AssimilationCounter.WithLabelValues(_labelFile, _labelUpdated).Inc()
|
||||
} else {
|
||||
AssimilationCounter.WithLabelValues(_labelDir, _labelUpdated).Inc()
|
||||
}
|
||||
|
||||
case ActionMove:
|
||||
t.log.Debug().Str("path", path).Bool("isDir", isDir).Msg("scanning path (ActionMove)")
|
||||
// 4. Moved file
|
||||
@@ -234,11 +247,16 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
// 5. Moved directory
|
||||
// -> update directory and all children
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: path,
|
||||
ForceRescan: isDir,
|
||||
Recurse: isDir,
|
||||
Path: path,
|
||||
Recurse: isDir,
|
||||
})
|
||||
|
||||
if !isDir {
|
||||
AssimilationCounter.WithLabelValues(_labelFile, _labelMoved).Inc()
|
||||
} else {
|
||||
AssimilationCounter.WithLabelValues(_labelDir, _labelMoved).Inc()
|
||||
}
|
||||
|
||||
case ActionMoveFrom:
|
||||
t.log.Debug().Str("path", path).Bool("isDir", isDir).Msg("scanning path (ActionMoveFrom)")
|
||||
// 6. file/directory moved out of the watched directory
|
||||
@@ -258,6 +276,8 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
t.log.Error().Err(err).Str("path", path).Bool("isDir", isDir).Msg("failed to handle moved away item")
|
||||
}
|
||||
|
||||
// We do not do metrics here because this has been handled in `ActionMove`
|
||||
|
||||
case ActionDelete:
|
||||
t.log.Debug().Str("path", path).Bool("isDir", isDir).Msg("handling deleted item")
|
||||
|
||||
@@ -270,10 +290,15 @@ func (t *Tree) Scan(path string, action EventAction, isDir bool) error {
|
||||
}
|
||||
|
||||
t.scanDebouncer.Debounce(scanItem{
|
||||
Path: filepath.Dir(path),
|
||||
ForceRescan: true,
|
||||
Recurse: true,
|
||||
Path: filepath.Dir(path),
|
||||
Recurse: true,
|
||||
})
|
||||
|
||||
if !isDir {
|
||||
AssimilationCounter.WithLabelValues(_labelFile, _labelDeleted).Inc()
|
||||
} else {
|
||||
AssimilationCounter.WithLabelValues(_labelDir, _labelDeleted).Inc()
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -369,7 +394,7 @@ func (t *Tree) findSpaceId(path string) (string, error) {
|
||||
}
|
||||
|
||||
func (t *Tree) assimilate(item scanItem) error {
|
||||
t.log.Debug().Str("path", item.Path).Bool("rescan", item.ForceRescan).Bool("recurse", item.Recurse).Msg("assimilate")
|
||||
t.log.Debug().Str("path", item.Path).Bool("recurse", item.Recurse).Msg("assimilate")
|
||||
var err error
|
||||
|
||||
spaceID, id, parentID, mtime, err := t.lookup.MetadataBackend().IdentifyPath(context.Background(), item.Path)
|
||||
@@ -379,7 +404,7 @@ func (t *Tree) assimilate(item scanItem) error {
|
||||
|
||||
if spaceID == "" {
|
||||
// node didn't have a space ID attached. try to find it by walking up the path on disk
|
||||
spaceID, err = t.findSpaceId(item.Path)
|
||||
spaceID, err = t.findSpaceId(filepath.Dir(item.Path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -428,7 +453,7 @@ func (t *Tree) assimilate(item scanItem) error {
|
||||
t.log.Error().Err(err).Str("path", item.Path).Msg("could not purge metadata")
|
||||
}
|
||||
go func() {
|
||||
if err := t.assimilate(scanItem{Path: item.Path, ForceRescan: true}); err != nil {
|
||||
if err := t.assimilate(scanItem{Path: item.Path}); err != nil {
|
||||
t.log.Error().Err(err).Str("path", item.Path).Msg("could not re-assimilate")
|
||||
}
|
||||
}()
|
||||
@@ -590,7 +615,7 @@ assimilate:
|
||||
}
|
||||
|
||||
// assimilate parent first
|
||||
err = t.assimilate(scanItem{Path: filepath.Dir(path), ForceRescan: false})
|
||||
err = t.assimilate(scanItem{Path: filepath.Dir(path)})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -822,7 +847,7 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error {
|
||||
// this id clashes with an existing id -> re-assimilate
|
||||
_, err := os.Stat(previousPath)
|
||||
if err == nil {
|
||||
_ = t.assimilate(scanItem{Path: path, ForceRescan: true})
|
||||
_ = t.assimilate(scanItem{Path: path})
|
||||
}
|
||||
}
|
||||
if err := t.lookup.CacheID(context.Background(), spaceID, id, path); err != nil {
|
||||
@@ -830,7 +855,7 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error {
|
||||
}
|
||||
}
|
||||
} else if assimilate {
|
||||
if err := t.assimilate(scanItem{Path: path, ForceRescan: true}); err != nil {
|
||||
if err := t.assimilate(scanItem{Path: path}); err != nil {
|
||||
t.log.Error().Err(err).Str("path", path).Msg("could not assimilate item")
|
||||
}
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package tree
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
var (
|
||||
// constants for AssimilationCounter labels
|
||||
_labelFile = "file"
|
||||
_labelDir = "dir"
|
||||
_labelAdded = "added"
|
||||
_labelUpdated = "updated"
|
||||
_labelDeleted = "deleted"
|
||||
_labelMoved = "moved"
|
||||
|
||||
// AssimilationCounter is a Prometheus counter that tracks the number of files and directories assimilated by posixfs.
|
||||
AssimilationCounter = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "reva_assimilation_count",
|
||||
Help: "Number of files and directories assimilated by posixfs",
|
||||
},
|
||||
// type can be "file" or "dir"
|
||||
// action can be "added", "updated", "deleted", "moved"
|
||||
[]string{"type", "action"},
|
||||
)
|
||||
|
||||
// AssimilationPendingTasks is a Prometheus gauge that tracks the number of active assimilation tasks.
|
||||
AssimilationPendingTasks = promauto.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "reva_assimilation_active_tasks",
|
||||
Help: "Number of active assimilation tasks in posixfs",
|
||||
})
|
||||
)
|
||||
+2
-3
@@ -65,9 +65,8 @@ type Watcher interface {
|
||||
}
|
||||
|
||||
type scanItem struct {
|
||||
Path string
|
||||
ForceRescan bool
|
||||
Recurse bool
|
||||
Path string
|
||||
Recurse bool
|
||||
}
|
||||
|
||||
// Tree manages a hierarchical tree
|
||||
|
||||
Generated
Vendored
+6
@@ -8,6 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/google/renameio/v2"
|
||||
@@ -108,6 +109,11 @@ func (b HybridBackend) GetInt64(ctx context.Context, n MetadataNode, key string)
|
||||
|
||||
func (b HybridBackend) list(ctx context.Context, n MetadataNode, acquireLock bool) (attribs []string, err error) {
|
||||
filePath := n.InternalPath()
|
||||
|
||||
if len(filePath) == 0 {
|
||||
return nil, &xattr.Error{Op: "HybridBackend.list", Path: n.InternalPath(), Err: syscall.ENOENT} // attribute not found
|
||||
}
|
||||
|
||||
attrs, err := xattr.List(filePath)
|
||||
if err == nil {
|
||||
return attrs, nil
|
||||
|
||||
Reference in New Issue
Block a user