Pilorama fixes for support/v0.38 #1255
23 changed files with 885 additions and 522 deletions
|
@ -66,7 +66,7 @@ func move(cmd *cobra.Command, _ []string) {
|
|||
Body: &tree.GetSubTreeRequest_Body{
|
||||
ContainerId: rawCID,
|
||||
TreeId: tid,
|
||||
RootId: nid,
|
||||
RootId: []uint64{nid},
|
||||
Depth: 1,
|
||||
BearerToken: bt,
|
||||
},
|
||||
|
|
|
@ -68,7 +68,7 @@ func getSubTree(cmd *cobra.Command, _ []string) {
|
|||
Body: &tree.GetSubTreeRequest_Body{
|
||||
ContainerId: rawCID,
|
||||
TreeId: tid,
|
||||
RootId: rid,
|
||||
RootId: []uint64{rid},
|
||||
Depth: depth,
|
||||
BearerToken: bt,
|
||||
},
|
||||
|
@ -83,10 +83,15 @@ func getSubTree(cmd *cobra.Command, _ []string) {
|
|||
for ; err == nil; subtreeResp, err = resp.Recv() {
|
||||
b := subtreeResp.GetBody()
|
||||
|
||||
cmd.Printf("Node ID: %d\n", b.GetNodeId())
|
||||
|
||||
cmd.Println("\tParent ID: ", b.GetParentId())
|
||||
cmd.Println("\tTimestamp: ", b.GetTimestamp())
|
||||
if len(b.GetNodeId()) == 1 {
|
||||
cmd.Printf("Node ID: %d\n", b.GetNodeId())
|
||||
cmd.Println("\tParent ID: ", b.GetParentId())
|
||||
cmd.Println("\tTimestamp: ", b.GetTimestamp())
|
||||
} else {
|
||||
cmd.Printf("Node IDs: %v\n", b.GetNodeId())
|
||||
cmd.Println("\tParent IDs: ", b.GetParentId())
|
||||
cmd.Println("\tTimestamps: ", b.GetTimestamp())
|
||||
}
|
||||
|
||||
if meta := b.GetMeta(); len(meta) > 0 {
|
||||
cmd.Println("\tMeta pairs: ")
|
||||
|
|
26
go.mod
26
go.mod
|
@ -4,7 +4,7 @@ go 1.20
|
|||
|
||||
require (
|
||||
code.gitea.io/sdk/gitea v0.17.1
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240215124401-634e24aba715
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240717110908-4e13f713f156
|
||||
git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240409111539-e7a05a49ff45
|
||||
git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20231101111734-b3ad3335ff65
|
||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20240301150205-6fe4e2541d0b
|
||||
|
@ -38,11 +38,11 @@ require (
|
|||
go.opentelemetry.io/otel/trace v1.22.0
|
||||
go.uber.org/zap v1.26.0
|
||||
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
|
||||
golang.org/x/sync v0.6.0
|
||||
golang.org/x/sys v0.18.0
|
||||
golang.org/x/term v0.18.0
|
||||
google.golang.org/grpc v1.61.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
golang.org/x/sync v0.7.0
|
||||
golang.org/x/sys v0.22.0
|
||||
golang.org/x/term v0.22.0
|
||||
google.golang.org/grpc v1.61.2
|
||||
google.golang.org/protobuf v1.34.2
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
|
@ -60,7 +60,7 @@ require (
|
|||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.13.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/consensys/bavard v0.1.13 // indirect
|
||||
github.com/consensys/gnark-crypto v0.12.2-0.20231222162921-eb75782795d2 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||
|
@ -71,7 +71,7 @@ require (
|
|||
github.com/go-fed/httpsig v1.1.0 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect
|
||||
|
@ -121,11 +121,11 @@ require (
|
|||
go.opentelemetry.io/otel/sdk v1.22.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/net v0.23.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
|
||||
golang.org/x/crypto v0.25.0 // indirect
|
||||
golang.org/x/net v0.27.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
lukechampine.com/blake3 v1.2.1 // indirect
|
||||
rsc.io/tmplfunc v0.0.3 // indirect
|
||||
|
|
55
go.sum
55
go.sum
|
@ -2,6 +2,8 @@ code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8=
|
|||
code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240215124401-634e24aba715 h1:EDtL9OJcdeevV/jmNMtHugulAQprdOnknNPvLB3LRgE=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240215124401-634e24aba715/go.mod h1:uY0AYmCznjZdghDnAk7THFIe1Vlg531IxUcus7ZfUJI=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240717110908-4e13f713f156 h1:sZ0XjBmCKP0W/p9ncP3UnGOvipKBfKq+EGwnEIi1+vQ=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240717110908-4e13f713f156/go.mod h1:+HRxsiuD0fZ1927c8MPqPD2BdDoJYmuJOC4pMqwJ9rE=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240409111539-e7a05a49ff45 h1:Tp4I+XOLp3VCJORfxSamQtj3RZNISbaLM4WD5iIzXxg=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-contract v0.19.3-0.20240409111539-e7a05a49ff45/go.mod h1:F/fe1OoIDKr5Bz99q4sriuHDuf3aZefZy9ZsCqEtgxc=
|
||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 h1:FxqFDhQYYgpe41qsIHVOcdzSVCB8JNSfPG7Uk4r2oSk=
|
||||
|
@ -29,8 +31,8 @@ github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJR
|
|||
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo=
|
||||
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
|
@ -85,8 +87,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
|
|||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
|
@ -316,15 +318,15 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5
|
|||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
|
||||
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
|
||||
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
|
||||
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
|
@ -339,8 +341,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug
|
|||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
|
||||
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -349,8 +351,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
@ -375,15 +377,15 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
|
||||
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
|
||||
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
|
@ -391,8 +393,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
|
@ -400,19 +403,19 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f
|
|||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
|
||||
google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
|
||||
google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
||||
google.golang.org/grpc v1.61.2 h1:TzJay21lXCf7BiNFKl7mSskt5DlkKAumAYTs52SpJeo=
|
||||
google.golang.org/grpc v1.61.2/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -422,8 +425,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
|
|||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
|
|
|
@ -210,18 +210,17 @@ func (e *StorageEngine) TreeGetChildren(ctx context.Context, cid cidSDK.ID, tree
|
|||
}
|
||||
|
||||
// TreeSortedByFilename implements the pilorama.Forest interface.
|
||||
func (e *StorageEngine) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.Node, last *string, count int) ([]pilorama.NodeInfo, *string, error) {
|
||||
func (e *StorageEngine) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.MultiNode, last *string, count int) ([]pilorama.MultiNodeInfo, *string, error) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "StorageEngine.TreeSortedByFilename",
|
||||
trace.WithAttributes(
|
||||
attribute.String("container_id", cid.EncodeToString()),
|
||||
attribute.String("tree_id", treeID),
|
||||
attribute.String("node_id", strconv.FormatUint(nodeID, 10)),
|
||||
),
|
||||
)
|
||||
defer span.End()
|
||||
|
||||
var err error
|
||||
var nodes []pilorama.NodeInfo
|
||||
var nodes []pilorama.MultiNodeInfo
|
||||
var cursor *string
|
||||
for _, sh := range e.sortShards(cid) {
|
||||
nodes, cursor, err = sh.TreeSortedByFilename(ctx, cid, treeID, nodeID, last, count)
|
||||
|
|
|
@ -906,7 +906,7 @@ func (t *boltForest) TreeGetByPath(ctx context.Context, cid cidSDK.ID, treeID st
|
|||
|
||||
b := treeRoot.Bucket(dataBucket)
|
||||
|
||||
i, curNode, err := t.getPathPrefix(b, attr, path[:len(path)-1])
|
||||
i, curNodes, err := t.getPathPrefixMultiTraversal(b, attr, path[:len(path)-1])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -918,21 +918,23 @@ func (t *boltForest) TreeGetByPath(ctx context.Context, cid cidSDK.ID, treeID st
|
|||
|
||||
c := b.Cursor()
|
||||
|
||||
attrKey := internalKey(nil, attr, path[len(path)-1], curNode, 0)
|
||||
attrKey = attrKey[:len(attrKey)-8]
|
||||
childKey, _ := c.Seek(attrKey)
|
||||
for len(childKey) == len(attrKey)+8 && bytes.Equal(attrKey, childKey[:len(childKey)-8]) {
|
||||
child := binary.LittleEndian.Uint64(childKey[len(childKey)-8:])
|
||||
if latest {
|
||||
_, ts, _, _ := t.getState(b, stateKey(make([]byte, 9), child))
|
||||
if ts >= maxTimestamp {
|
||||
nodes = append(nodes[:0], child)
|
||||
maxTimestamp = ts
|
||||
for i := range curNodes {
|
||||
attrKey := internalKey(nil, attr, path[len(path)-1], curNodes[i], 0)
|
||||
attrKey = attrKey[:len(attrKey)-8]
|
||||
childKey, _ := c.Seek(attrKey)
|
||||
for len(childKey) == len(attrKey)+8 && bytes.Equal(attrKey, childKey[:len(childKey)-8]) {
|
||||
child := binary.LittleEndian.Uint64(childKey[len(childKey)-8:])
|
||||
if latest {
|
||||
_, ts, _, _ := t.getState(b, stateKey(make([]byte, 9), child))
|
||||
if ts >= maxTimestamp {
|
||||
nodes = append(nodes[:0], child)
|
||||
maxTimestamp = ts
|
||||
}
|
||||
} else {
|
||||
nodes = append(nodes, child)
|
||||
}
|
||||
} else {
|
||||
nodes = append(nodes, child)
|
||||
childKey, _ = c.Next()
|
||||
}
|
||||
childKey, _ = c.Next()
|
||||
}
|
||||
return nil
|
||||
}))
|
||||
|
@ -988,23 +990,26 @@ func (t *boltForest) TreeGetMeta(ctx context.Context, cid cidSDK.ID, treeID stri
|
|||
return m, parentID, metaerr.Wrap(err)
|
||||
}
|
||||
|
||||
func (t *boltForest) hasFewChildren(b *bbolt.Bucket, nodeID Node, threshold int) bool {
|
||||
func (t *boltForest) hasFewChildren(b *bbolt.Bucket, nodeIDs MultiNode, threshold int) bool {
|
||||
key := make([]byte, 9)
|
||||
key[0] = 'c'
|
||||
binary.LittleEndian.PutUint64(key[1:], nodeID)
|
||||
|
||||
count := 0
|
||||
c := b.Cursor()
|
||||
for k, _ := c.Seek(key); len(k) == childrenKeySize && binary.LittleEndian.Uint64(k[1:]) == nodeID; k, _ = c.Next() {
|
||||
if count++; count > threshold {
|
||||
return false
|
||||
for _, nodeID := range nodeIDs {
|
||||
binary.LittleEndian.PutUint64(key[1:], nodeID)
|
||||
|
||||
c := b.Cursor()
|
||||
for k, _ := c.Seek(key); len(k) == childrenKeySize && binary.LittleEndian.Uint64(k[1:]) == nodeID; k, _ = c.Next() {
|
||||
if count++; count > threshold {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// TreeSortedByFilename implements the Forest interface.
|
||||
func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID Node, last *string, count int) ([]NodeInfo, *string, error) {
|
||||
func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeIDs MultiNode, last *string, count int) ([]MultiNodeInfo, *string, error) {
|
||||
var (
|
||||
startedAt = time.Now()
|
||||
success = false
|
||||
|
@ -1017,7 +1022,6 @@ func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, tr
|
|||
trace.WithAttributes(
|
||||
attribute.String("container_id", cid.EncodeToString()),
|
||||
attribute.String("tree_id", treeID),
|
||||
attribute.String("node_id", strconv.FormatUint(nodeID, 10)),
|
||||
),
|
||||
)
|
||||
defer span.End()
|
||||
|
@ -1028,6 +1032,9 @@ func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, tr
|
|||
if t.mode.NoMetabase() {
|
||||
return nil, last, ErrDegradedMode
|
||||
}
|
||||
if len(nodeIDs) == 0 {
|
||||
return nil, last, errors.New("empty node list")
|
||||
}
|
||||
|
||||
h := newHeap(last, count)
|
||||
key := make([]byte, 9)
|
||||
|
@ -1046,20 +1053,22 @@ func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, tr
|
|||
// If the node is a leaf, we could scan all filenames in the tree.
|
||||
// To prevent this we first count the number of children: if it is less than
|
||||
// the number of nodes we need to return, fallback to TreeGetChildren() implementation.
|
||||
if fewChildren = t.hasFewChildren(b, nodeID, count); fewChildren {
|
||||
if fewChildren = t.hasFewChildren(b, nodeIDs, count); fewChildren {
|
||||
var err error
|
||||
result, err = t.getChildren(b, nodeID)
|
||||
result, err = t.getChildren(b, nodeIDs)
|
||||
return err
|
||||
}
|
||||
|
||||
t.fillSortedChildren(b, nodeID, h)
|
||||
t.fillSortedChildren(b, nodeIDs, h)
|
||||
|
||||
for info, ok := h.pop(); ok; info, ok = h.pop() {
|
||||
childInfo, err := t.getChildInfo(b, key, info.id)
|
||||
if err != nil {
|
||||
return err
|
||||
for _, id := range info.id {
|
||||
childInfo, err := t.getChildInfo(b, key, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result = append(result, childInfo)
|
||||
}
|
||||
result = append(result, childInfo)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
@ -1072,11 +1081,15 @@ func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, tr
|
|||
if fewChildren {
|
||||
result = sortAndCut(result, last)
|
||||
}
|
||||
if len(result) != 0 {
|
||||
s := string(result[len(result)-1].Meta.GetAttr(AttributeFilename))
|
||||
res := mergeNodeInfos(result)
|
||||
if len(res) > count {
|
||||
res = res[:count]
|
||||
}
|
||||
if len(res) != 0 {
|
||||
s := string(findAttr(res[len(res)-1].Meta, AttributeFilename))
|
||||
last = &s
|
||||
}
|
||||
return result, last, metaerr.Wrap(err)
|
||||
return res, last, metaerr.Wrap(err)
|
||||
}
|
||||
|
||||
func sortAndCut(result []NodeInfo, last *string) []NodeInfo {
|
||||
|
@ -1107,37 +1120,64 @@ func (t *boltForest) getChildInfo(b *bbolt.Bucket, key []byte, childID Node) (No
|
|||
return childInfo, nil
|
||||
}
|
||||
|
||||
func (t *boltForest) fillSortedChildren(b *bbolt.Bucket, nodeID Node, h *fixedHeap) {
|
||||
func (t *boltForest) fillSortedChildren(b *bbolt.Bucket, nodeIDs MultiNode, h *fixedHeap) {
|
||||
c := b.Cursor()
|
||||
prefix := internalKeyPrefix(nil, AttributeFilename)
|
||||
|
||||
length := uint16(0)
|
||||
count := 0
|
||||
|
||||
var nodes []uint64
|
||||
var lastFilename *string
|
||||
for k, _ := c.Seek(prefix); len(k) > 0 && k[0] == 'i'; k, _ = c.Next() {
|
||||
if len(k) < len(prefix)+2+16 {
|
||||
continue
|
||||
}
|
||||
|
||||
parentID := binary.LittleEndian.Uint64(k[len(k)-16:])
|
||||
if parentID != nodeID {
|
||||
|
||||
var contains bool
|
||||
|
||||
for i := range nodeIDs {
|
||||
if parentID == nodeIDs[i] {
|
||||
contains = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !contains {
|
||||
continue
|
||||
}
|
||||
|
||||
actualLength := binary.LittleEndian.Uint16(k[len(prefix):])
|
||||
childID := binary.LittleEndian.Uint64(k[len(k)-8:])
|
||||
filename := string(k[len(prefix)+2 : len(k)-16])
|
||||
processed := h.push(childID, filename)
|
||||
if actualLength != length {
|
||||
length = actualLength
|
||||
count = 1
|
||||
} else if processed {
|
||||
if count++; count > h.count {
|
||||
length = actualLength + 1
|
||||
c.Seek(append(prefix, byte(length), byte(length>>8)))
|
||||
c.Prev() // c.Next() will be performed by for loop
|
||||
|
||||
if lastFilename == nil {
|
||||
lastFilename = &filename
|
||||
nodes = append(nodes, childID)
|
||||
} else if *lastFilename == filename {
|
||||
nodes = append(nodes, childID)
|
||||
} else {
|
||||
processed := h.push(nodes, *lastFilename)
|
||||
nodes = MultiNode{childID}
|
||||
lastFilename = &filename
|
||||
if actualLength != length {
|
||||
length = actualLength
|
||||
count = 1
|
||||
} else if processed {
|
||||
if count++; count > h.count {
|
||||
lastFilename = nil
|
||||
nodes = nil
|
||||
length = actualLength + 1
|
||||
c.Seek(append(prefix, byte(length), byte(length>>8)))
|
||||
c.Prev() // c.Next() will be performed by for loop
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(nodes) != 0 && lastFilename != nil {
|
||||
h.push(nodes, *lastFilename)
|
||||
}
|
||||
}
|
||||
|
||||
// TreeGetChildren implements the Forest interface.
|
||||
|
@ -1177,28 +1217,30 @@ func (t *boltForest) TreeGetChildren(ctx context.Context, cid cidSDK.ID, treeID
|
|||
b := treeRoot.Bucket(dataBucket)
|
||||
|
||||
var err error
|
||||
result, err = t.getChildren(b, nodeID)
|
||||
result, err = t.getChildren(b, []Node{nodeID})
|
||||
return err
|
||||
})
|
||||
success = err == nil
|
||||
return result, metaerr.Wrap(err)
|
||||
}
|
||||
|
||||
func (t *boltForest) getChildren(b *bbolt.Bucket, nodeID Node) ([]NodeInfo, error) {
|
||||
func (t *boltForest) getChildren(b *bbolt.Bucket, nodeIDs MultiNode) ([]NodeInfo, error) {
|
||||
var result []NodeInfo
|
||||
|
||||
key := make([]byte, 9)
|
||||
key[0] = 'c'
|
||||
binary.LittleEndian.PutUint64(key[1:], nodeID)
|
||||
for _, nodeID := range nodeIDs {
|
||||
key[0] = 'c'
|
||||
binary.LittleEndian.PutUint64(key[1:], nodeID)
|
||||
|
||||
c := b.Cursor()
|
||||
for k, _ := c.Seek(key); len(k) == childrenKeySize && binary.LittleEndian.Uint64(k[1:]) == nodeID; k, _ = c.Next() {
|
||||
childID := binary.LittleEndian.Uint64(k[9:])
|
||||
childInfo, err := t.getChildInfo(b, key, childID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
c := b.Cursor()
|
||||
for k, _ := c.Seek(key); len(k) == childrenKeySize && binary.LittleEndian.Uint64(k[1:]) == nodeID; k, _ = c.Next() {
|
||||
childID := binary.LittleEndian.Uint64(k[9:])
|
||||
childInfo, err := t.getChildInfo(b, key, childID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result = append(result, childInfo)
|
||||
}
|
||||
result = append(result, childInfo)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
@ -1412,6 +1454,36 @@ func (t *boltForest) TreeListTrees(ctx context.Context, prm TreeListTreesPrm) (*
|
|||
return &res, nil
|
||||
}
|
||||
|
||||
func (t *boltForest) getPathPrefixMultiTraversal(bTree *bbolt.Bucket, attr string, path []string) (int, []Node, error) {
|
||||
c := bTree.Cursor()
|
||||
|
||||
var curNodes []Node
|
||||
nextNodes := []Node{RootID}
|
||||
var attrKey []byte
|
||||
|
||||
for i := range path {
|
||||
curNodes, nextNodes = nextNodes, curNodes[:0]
|
||||
for j := range curNodes {
|
||||
attrKey = internalKey(attrKey, attr, path[i], curNodes[j], 0)
|
||||
attrKey = attrKey[:len(attrKey)-8]
|
||||
|
||||
childKey, value := c.Seek(attrKey)
|
||||
for len(childKey) == len(attrKey)+8 && bytes.Equal(attrKey, childKey[:len(childKey)-8]) {
|
||||
if len(value) == 1 && value[0] == 1 {
|
||||
nextNodes = append(nextNodes, binary.LittleEndian.Uint64(childKey[len(childKey)-8:]))
|
||||
}
|
||||
childKey, value = c.Next()
|
||||
}
|
||||
}
|
||||
|
||||
if len(nextNodes) == 0 {
|
||||
return i, curNodes, nil
|
||||
}
|
||||
}
|
||||
|
||||
return len(path), nextNodes, nil
|
||||
}
|
||||
|
||||
func (t *boltForest) getPathPrefix(bTree *bbolt.Bucket, attr string, path []string) (int, Node, error) {
|
||||
c := bTree.Cursor()
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ func (f *memoryForest) TreeGetMeta(_ context.Context, cid cid.ID, treeID string,
|
|||
}
|
||||
|
||||
// TreeSortedByFilename implements the Forest interface.
|
||||
func (f *memoryForest) TreeSortedByFilename(_ context.Context, cid cid.ID, treeID string, nodeID Node, start *string, count int) ([]NodeInfo, *string, error) {
|
||||
func (f *memoryForest) TreeSortedByFilename(_ context.Context, cid cid.ID, treeID string, nodeIDs MultiNode, start *string, count int) ([]MultiNodeInfo, *string, error) {
|
||||
fullID := cid.String() + "/" + treeID
|
||||
s, ok := f.treeMap[fullID]
|
||||
if !ok {
|
||||
|
@ -166,40 +166,45 @@ func (f *memoryForest) TreeSortedByFilename(_ context.Context, cid cid.ID, treeI
|
|||
return nil, start, nil
|
||||
}
|
||||
|
||||
children := s.tree.getChildren(nodeID)
|
||||
res := make([]NodeInfo, 0, len(children))
|
||||
for _, childID := range children {
|
||||
var found bool
|
||||
for _, kv := range s.infoMap[childID].Meta.Items {
|
||||
if kv.Key == AttributeFilename {
|
||||
found = true
|
||||
break
|
||||
var res []NodeInfo
|
||||
|
||||
for _, nodeID := range nodeIDs {
|
||||
children := s.tree.getChildren(nodeID)
|
||||
for _, childID := range children {
|
||||
var found bool
|
||||
for _, kv := range s.infoMap[childID].Meta.Items {
|
||||
if kv.Key == AttributeFilename {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
res = append(res, NodeInfo{
|
||||
ID: childID,
|
||||
Meta: s.infoMap[childID].Meta,
|
||||
ParentID: s.infoMap[childID].Parent,
|
||||
})
|
||||
}
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
res = append(res, NodeInfo{
|
||||
ID: childID,
|
||||
Meta: s.infoMap[childID].Meta,
|
||||
ParentID: s.infoMap[childID].Parent,
|
||||
})
|
||||
}
|
||||
if len(res) == 0 {
|
||||
return res, start, nil
|
||||
return nil, start, nil
|
||||
}
|
||||
|
||||
sort.Slice(res, func(i, j int) bool {
|
||||
return bytes.Compare(res[i].Meta.GetAttr(AttributeFilename), res[j].Meta.GetAttr(AttributeFilename)) == -1
|
||||
})
|
||||
for i := range res {
|
||||
if start == nil || string(res[i].Meta.GetAttr(AttributeFilename)) > *start {
|
||||
|
||||
r := mergeNodeInfos(res)
|
||||
for i := range r {
|
||||
if start == nil || string(findAttr(r[i].Meta, AttributeFilename)) > *start {
|
||||
finish := i + count
|
||||
if len(res) < finish {
|
||||
finish = len(res)
|
||||
}
|
||||
last := string(res[finish-1].Meta.GetAttr(AttributeFilename))
|
||||
return res[i:finish], &last, nil
|
||||
last := string(findAttr(r[finish-1].Meta, AttributeFilename))
|
||||
return r[i:finish], &last, nil
|
||||
}
|
||||
}
|
||||
last := string(res[len(res)-1].Meta.GetAttr(AttributeFilename))
|
||||
|
|
|
@ -215,7 +215,7 @@ func BenchmarkForestSortedIteration(b *testing.B) {
|
|||
|
||||
b.Run(providers[i].name+",root", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
res, _, err := f.TreeSortedByFilename(context.Background(), cnr, treeID, RootID, nil, 100)
|
||||
res, _, err := f.TreeSortedByFilename(context.Background(), cnr, treeID, MultiNode{RootID}, nil, 100)
|
||||
if err != nil || len(res) != 100 {
|
||||
b.Fatalf("err %v, count %d", err, len(res))
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ func BenchmarkForestSortedIteration(b *testing.B) {
|
|||
})
|
||||
b.Run(providers[i].name+",leaf", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
res, _, err := f.TreeSortedByFilename(context.Background(), cnr, treeID, 1, nil, 100)
|
||||
res, _, err := f.TreeSortedByFilename(context.Background(), cnr, treeID, MultiNode{1}, nil, 100)
|
||||
if err != nil || len(res) != 0 {
|
||||
b.FailNow()
|
||||
}
|
||||
|
@ -266,9 +266,9 @@ func testForestTreeSortedIteration(t *testing.T, s ForestStorage) {
|
|||
treeAdd(t, i+1, strconv.Itoa(i+1))
|
||||
}
|
||||
|
||||
var result []NodeInfo
|
||||
var result []MultiNodeInfo
|
||||
treeAppend := func(t *testing.T, last *string, count int) *string {
|
||||
res, cursor, err := s.TreeSortedByFilename(context.Background(), d.CID, treeID, RootID, last, count)
|
||||
res, cursor, err := s.TreeSortedByFilename(context.Background(), d.CID, treeID, MultiNode{RootID}, last, count)
|
||||
require.NoError(t, err)
|
||||
result = append(result, res...)
|
||||
return cursor
|
||||
|
@ -282,11 +282,11 @@ func testForestTreeSortedIteration(t *testing.T, s ForestStorage) {
|
|||
|
||||
require.Len(t, result, count)
|
||||
for i := range result {
|
||||
require.Equal(t, RootID+uint64(i+1), result[i].ID)
|
||||
require.Equal(t, MultiNode{RootID + uint64(i+1)}, result[i].Children)
|
||||
if i == 0 {
|
||||
require.Equal(t, "", string(result[i].Meta.GetAttr(AttributeFilename)))
|
||||
require.Equal(t, "", string(findAttr(result[i].Meta, AttributeFilename)))
|
||||
} else {
|
||||
require.Equal(t, strconv.Itoa(RootID+i+1), string(result[i].Meta.GetAttr(AttributeFilename)))
|
||||
require.Equal(t, strconv.Itoa(RootID+i+1), string(findAttr(result[i].Meta, AttributeFilename)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -318,12 +318,12 @@ func testForestTreeSortedByFilename(t *testing.T, s ForestStorage) {
|
|||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
expectAttributes := func(t *testing.T, attr string, expected []string, res []NodeInfo) {
|
||||
expectAttributes := func(t *testing.T, attr string, expected []string, res []MultiNodeInfo) {
|
||||
require.Equal(t, len(expected), len(res))
|
||||
|
||||
actual := make([]string, len(res))
|
||||
for i := range actual {
|
||||
actual[i] = string(res[i].Meta.GetAttr(attr))
|
||||
actual[i] = string(findAttr(res[i].Meta, attr))
|
||||
}
|
||||
require.Equal(t, expected, actual)
|
||||
}
|
||||
|
@ -345,40 +345,40 @@ func testForestTreeSortedByFilename(t *testing.T, s ForestStorage) {
|
|||
treeAddByPath(t, items[i])
|
||||
}
|
||||
|
||||
getChildren := func(t *testing.T, id Node) []NodeInfo {
|
||||
getChildren := func(t *testing.T, id MultiNode) []MultiNodeInfo {
|
||||
res, _, err := s.TreeSortedByFilename(context.Background(), d.CID, treeID, id, nil, len(items))
|
||||
require.NoError(t, err)
|
||||
return res
|
||||
}
|
||||
|
||||
res := getChildren(t, RootID)
|
||||
res := getChildren(t, MultiNode{RootID})
|
||||
expectAttributes(t, AttributeFilename, []string{"a", "b", "c"}, res)
|
||||
expectAttributes(t, controlAttr, []string{"", "", "c"}, res)
|
||||
|
||||
{
|
||||
ra := getChildren(t, res[0].ID)
|
||||
ra := getChildren(t, res[0].Children)
|
||||
expectAttributes(t, AttributeFilename, []string{"bbb"}, ra)
|
||||
expectAttributes(t, controlAttr, []string{""}, ra)
|
||||
|
||||
rabbb := getChildren(t, ra[0].ID)
|
||||
rabbb := getChildren(t, ra[0].Children)
|
||||
expectAttributes(t, AttributeFilename, []string{"ccc", "xxx", "z"}, rabbb)
|
||||
expectAttributes(t, controlAttr, []string{"a/bbb/ccc", "a/bbb/xxx", "a/bbb/z"}, rabbb)
|
||||
}
|
||||
{
|
||||
rb := getChildren(t, res[1].ID)
|
||||
rb := getChildren(t, res[1].Children)
|
||||
expectAttributes(t, AttributeFilename, []string{"bbb", "xxx"}, rb)
|
||||
expectAttributes(t, controlAttr, []string{"", ""}, rb)
|
||||
|
||||
rbbbb := getChildren(t, rb[0].ID)
|
||||
rbbbb := getChildren(t, rb[0].Children)
|
||||
expectAttributes(t, AttributeFilename, []string{"ccc"}, rbbbb)
|
||||
expectAttributes(t, controlAttr, []string{"b/bbb/ccc"}, rbbbb)
|
||||
|
||||
rbxxx := getChildren(t, rb[1].ID)
|
||||
rbxxx := getChildren(t, rb[1].Children)
|
||||
expectAttributes(t, AttributeFilename, []string{"z"}, rbxxx)
|
||||
expectAttributes(t, controlAttr, []string{"b/xxx/z"}, rbxxx)
|
||||
}
|
||||
{
|
||||
rc := getChildren(t, res[2].ID)
|
||||
rc := getChildren(t, res[2].Children)
|
||||
require.Len(t, rc, 0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
)
|
||||
|
||||
type heapInfo struct {
|
||||
id Node
|
||||
id MultiNode
|
||||
filename string
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ func newHeap(start *string, count int) *fixedHeap {
|
|||
}
|
||||
}
|
||||
|
||||
func (h *fixedHeap) push(id Node, filename string) bool {
|
||||
func (h *fixedHeap) push(id MultiNode, filename string) bool {
|
||||
if h.start != nil && filename <= *h.start {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ type Forest interface {
|
|||
TreeGetChildren(ctx context.Context, cid cidSDK.ID, treeID string, nodeID Node) ([]NodeInfo, error)
|
||||
// TreeSortedByFilename returns children of the node with the specified ID. The nodes are sorted by the filename attribute..
|
||||
// Should return ErrTreeNotFound if the tree is not found, and empty result if the node is not in the tree.
|
||||
TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID Node, last *string, count int) ([]NodeInfo, *string, error)
|
||||
TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID MultiNode, last *string, count int) ([]MultiNodeInfo, *string, error)
|
||||
// TreeGetOpLog returns first log operation stored at or above the height.
|
||||
// In case no such operation is found, empty Move and nil error should be returned.
|
||||
TreeGetOpLog(ctx context.Context, cid cidSDK.ID, treeID string, height uint64) (Move, error)
|
||||
|
|
|
@ -21,7 +21,11 @@ func (x Meta) Bytes() []byte {
|
|||
}
|
||||
|
||||
func (x Meta) GetAttr(name string) []byte {
|
||||
for _, kv := range x.Items {
|
||||
return findAttr(x.Items, name)
|
||||
}
|
||||
|
||||
func findAttr(ms []KeyValue, name string) []byte {
|
||||
for _, kv := range ms {
|
||||
if kv.Key == name {
|
||||
return kv.Value
|
||||
}
|
||||
|
|
49
pkg/local_object_storage/pilorama/multinode.go
Normal file
49
pkg/local_object_storage/pilorama/multinode.go
Normal file
|
@ -0,0 +1,49 @@
|
|||
package pilorama
|
||||
|
||||
import "bytes"
|
||||
|
||||
// MultiNode represents a group of internal nodes accessible by the same path, but having different id.
|
||||
type MultiNode []Node
|
||||
|
||||
// MultiNodeInfo represents a group of internal nodes accessible by the same path, but having different id.
|
||||
type MultiNodeInfo struct {
|
||||
Children MultiNode
|
||||
Parents MultiNode
|
||||
Timestamps []uint64
|
||||
Meta []KeyValue
|
||||
}
|
||||
|
||||
func (r *MultiNodeInfo) Add(info NodeInfo) bool {
|
||||
if !isInternal(info.Meta.Items) || !isInternal(r.Meta) ||
|
||||
!bytes.Equal(r.Meta[0].Value, info.Meta.Items[0].Value) {
|
||||
return false
|
||||
}
|
||||
|
||||
r.Children = append(r.Children, info.ID)
|
||||
r.Parents = append(r.Parents, info.ParentID)
|
||||
r.Timestamps = append(r.Timestamps, info.Meta.Time)
|
||||
return true
|
||||
}
|
||||
|
||||
func (n NodeInfo) ToMultiNode() MultiNodeInfo {
|
||||
return MultiNodeInfo{
|
||||
Children: MultiNode{n.ID},
|
||||
Parents: MultiNode{n.ParentID},
|
||||
Timestamps: []uint64{n.Meta.Time},
|
||||
Meta: n.Meta.Items,
|
||||
}
|
||||
}
|
||||
|
||||
func isInternal(m []KeyValue) bool {
|
||||
return len(m) == 1 && m[0].Key == AttributeFilename
|
||||
}
|
||||
|
||||
func mergeNodeInfos(ns []NodeInfo) []MultiNodeInfo {
|
||||
var r []MultiNodeInfo
|
||||
for _, info := range ns {
|
||||
if len(r) == 0 || !r[len(r)-1].Add(info) {
|
||||
r = append(r, info.ToMultiNode())
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
155
pkg/local_object_storage/pilorama/split_test.go
Normal file
155
pkg/local_object_storage/pilorama/split_test.go
Normal file
|
@ -0,0 +1,155 @@
|
|||
package pilorama
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestDuplicateDirectory(t *testing.T) {
|
||||
for i := range providers {
|
||||
if providers[i].name == "inmemory" {
|
||||
continue
|
||||
}
|
||||
t.Run(providers[i].name, func(t *testing.T) {
|
||||
testDuplicateDirectory(t, providers[i].construct(t))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func testDuplicateDirectory(t *testing.T, f Forest) {
|
||||
ctx := context.Background()
|
||||
d := CIDDescriptor{CID: cidtest.ID(), Size: 1}
|
||||
treeID := "sometree"
|
||||
|
||||
treeApply := func(t *testing.T, parent, child uint64, filename string, internal bool) {
|
||||
// Nothing magic here, we add items in order and children are unique.
|
||||
// This simplifies function interface a bit.
|
||||
ts := child
|
||||
|
||||
kv := []KeyValue{{Key: AttributeFilename, Value: []byte(filename)}}
|
||||
if !internal {
|
||||
kv = append(kv, KeyValue{Key: "uniqueAttr", Value: []byte{byte(child)}})
|
||||
}
|
||||
|
||||
err := f.TreeApply(ctx, d.CID, treeID, &Move{
|
||||
Parent: parent,
|
||||
Child: child,
|
||||
Meta: Meta{
|
||||
Time: ts,
|
||||
Items: kv,
|
||||
},
|
||||
}, true)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// The following tree is constructed:
|
||||
// 0
|
||||
// [1] |-- dir1 (internal)
|
||||
// [2] |-- value1
|
||||
// [3] |-- dir3 (internal)
|
||||
// [4] |-- value3
|
||||
// [5] |-- dir1 (internal)
|
||||
// [6] |-- value2
|
||||
// [7] |-- dir3 (internal)
|
||||
// [8] |-- value4
|
||||
// [9] |-- dir2 (internal)
|
||||
// [10] |-- value0
|
||||
treeApply(t, RootID, 1, "dir1", true)
|
||||
treeApply(t, 1, 2, "value1", false)
|
||||
treeApply(t, 1, 3, "dir3", true)
|
||||
treeApply(t, 3, 4, "value3", false)
|
||||
treeApply(t, RootID, 5, "dir1", true)
|
||||
treeApply(t, 5, 6, "value2", false)
|
||||
treeApply(t, 5, 7, "dir3", true)
|
||||
treeApply(t, 7, 8, "value4", false)
|
||||
treeApply(t, RootID, 9, "dir2", true)
|
||||
treeApply(t, RootID, 10, "value0", false)
|
||||
|
||||
// The compacted view:
|
||||
// 0
|
||||
// [1,5] |-- dir1 (internal)
|
||||
// [2] |-- value1
|
||||
// [3,7] |-- dir3 (internal)
|
||||
// [4] |-- value3
|
||||
// [8] |-- value4
|
||||
// [6] |-- value2
|
||||
// [9] |-- dir2 (internal)
|
||||
// [10] |-- value0
|
||||
testGetByPath := func(t *testing.T, p string) []byte {
|
||||
pp := strings.Split(p, "/")
|
||||
nodes, err := f.TreeGetByPath(context.Background(), d.CID, treeID, AttributeFilename, pp, false)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 1, len(nodes))
|
||||
|
||||
meta, _, err := f.TreeGetMeta(ctx, d.CID, treeID, nodes[0])
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte(pp[len(pp)-1]), meta.GetAttr(AttributeFilename))
|
||||
return meta.GetAttr("uniqueAttr")
|
||||
}
|
||||
|
||||
require.Equal(t, []byte{2}, testGetByPath(t, "dir1/value1"))
|
||||
require.Equal(t, []byte{4}, testGetByPath(t, "dir1/dir3/value3"))
|
||||
require.Equal(t, []byte{8}, testGetByPath(t, "dir1/dir3/value4"))
|
||||
require.Equal(t, []byte{10}, testGetByPath(t, "value0"))
|
||||
|
||||
testSortedByFilename := func(t *testing.T, root MultiNode, last *string, batchSize int) ([]MultiNodeInfo, *string) {
|
||||
res, last, err := f.TreeSortedByFilename(context.Background(), d.CID, treeID, root, last, batchSize)
|
||||
require.NoError(t, err)
|
||||
return res, last
|
||||
}
|
||||
|
||||
t.Run("test sorted listing, full children branch", func(t *testing.T) {
|
||||
t.Run("big batch size", func(t *testing.T) {
|
||||
res, _ := testSortedByFilename(t, MultiNode{RootID}, nil, 10)
|
||||
require.Equal(t, 3, len(res))
|
||||
require.Equal(t, MultiNode{1, 5}, res[0].Children)
|
||||
require.Equal(t, MultiNode{9}, res[1].Children)
|
||||
require.Equal(t, MultiNode{10}, res[2].Children)
|
||||
|
||||
t.Run("multi-root", func(t *testing.T) {
|
||||
res, _ := testSortedByFilename(t, MultiNode{1, 5}, nil, 10)
|
||||
require.Equal(t, 3, len(res))
|
||||
require.Equal(t, MultiNode{3, 7}, res[0].Children)
|
||||
require.Equal(t, MultiNode{2}, res[1].Children)
|
||||
require.Equal(t, MultiNode{6}, res[2].Children)
|
||||
})
|
||||
})
|
||||
t.Run("small batch size", func(t *testing.T) {
|
||||
res, last := testSortedByFilename(t, MultiNode{RootID}, nil, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{1, 5}, res[0].Children)
|
||||
|
||||
res, last = testSortedByFilename(t, MultiNode{RootID}, last, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{9}, res[0].Children)
|
||||
|
||||
res, last = testSortedByFilename(t, MultiNode{RootID}, last, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{10}, res[0].Children)
|
||||
|
||||
res, _ = testSortedByFilename(t, MultiNode{RootID}, last, 1)
|
||||
require.Equal(t, 0, len(res))
|
||||
|
||||
t.Run("multi-root", func(t *testing.T) {
|
||||
res, last := testSortedByFilename(t, MultiNode{1, 5}, nil, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{3, 7}, res[0].Children)
|
||||
|
||||
res, last = testSortedByFilename(t, MultiNode{1, 5}, last, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{2}, res[0].Children)
|
||||
|
||||
res, last = testSortedByFilename(t, MultiNode{1, 5}, last, 1)
|
||||
require.Equal(t, 1, len(res))
|
||||
require.Equal(t, MultiNode{6}, res[0].Children)
|
||||
|
||||
res, _ = testSortedByFilename(t, MultiNode{RootID}, last, 1)
|
||||
require.Equal(t, 0, len(res))
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
|
@ -184,13 +184,12 @@ func (s *Shard) TreeGetChildren(ctx context.Context, cid cidSDK.ID, treeID strin
|
|||
}
|
||||
|
||||
// TreeSortedByFilename implements the pilorama.Forest interface.
|
||||
func (s *Shard) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.Node, last *string, count int) ([]pilorama.NodeInfo, *string, error) {
|
||||
func (s *Shard) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.MultiNode, last *string, count int) ([]pilorama.MultiNodeInfo, *string, error) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "Shard.TreeSortedByFilename",
|
||||
trace.WithAttributes(
|
||||
attribute.String("shard_id", s.ID().String()),
|
||||
attribute.String("container_id", cid.EncodeToString()),
|
||||
attribute.String("tree_id", treeID),
|
||||
attribute.String("node_id", strconv.FormatUint(nodeID, 10)),
|
||||
),
|
||||
)
|
||||
defer span.End()
|
||||
|
|
|
@ -6,106 +6,108 @@ import "pkg/services/control/ir/types.proto";
|
|||
|
||||
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/ir/control";
|
||||
|
||||
// `ControlService` provides an interface for internal work with the Inner Ring node.
|
||||
// `ControlService` provides an interface for internal work with the Inner Ring
|
||||
// node.
|
||||
service ControlService {
|
||||
// Performs health check of the IR node.
|
||||
rpc HealthCheck (HealthCheckRequest) returns (HealthCheckResponse);
|
||||
// Forces a new epoch to be signaled by the IR node with high probability.
|
||||
rpc TickEpoch (TickEpochRequest) returns (TickEpochResponse);
|
||||
// Forces a node removal to be signaled by the IR node with high probability.
|
||||
rpc RemoveNode (RemoveNodeRequest) returns (RemoveNodeResponse);
|
||||
// Forces a container removal to be signaled by the IR node with high probability.
|
||||
rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse);
|
||||
// Performs health check of the IR node.
|
||||
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
|
||||
// Forces a new epoch to be signaled by the IR node with high probability.
|
||||
rpc TickEpoch(TickEpochRequest) returns (TickEpochResponse);
|
||||
// Forces a node removal to be signaled by the IR node with high probability.
|
||||
rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse);
|
||||
// Forces a container removal to be signaled by the IR node with high
|
||||
// probability.
|
||||
rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse);
|
||||
}
|
||||
|
||||
// Health check request.
|
||||
message HealthCheckRequest {
|
||||
// Health check request body.
|
||||
message Body {}
|
||||
// Health check request body.
|
||||
message Body {}
|
||||
|
||||
// Body of health check request message.
|
||||
Body body = 1;
|
||||
// Body of health check request message.
|
||||
Body body = 1;
|
||||
|
||||
// Body signature.
|
||||
// Should be signed by node key or one of
|
||||
// the keys configured by the node.
|
||||
Signature signature = 2;
|
||||
// Body signature.
|
||||
// Should be signed by node key or one of
|
||||
// the keys configured by the node.
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
// Health check response.
|
||||
message HealthCheckResponse {
|
||||
// Health check response body
|
||||
message Body {
|
||||
// Health status of IR node application.
|
||||
HealthStatus health_status = 1;
|
||||
}
|
||||
// Health check response body
|
||||
message Body {
|
||||
// Health status of IR node application.
|
||||
HealthStatus health_status = 1;
|
||||
}
|
||||
|
||||
// Body of health check response message.
|
||||
Body body = 1;
|
||||
// Body of health check response message.
|
||||
Body body = 1;
|
||||
|
||||
// Body signature.
|
||||
Signature signature = 2;
|
||||
// Body signature.
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message TickEpochRequest {
|
||||
message Body{
|
||||
// Valid until block value override.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
message Body {
|
||||
// Valid until block value override.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message TickEpochResponse {
|
||||
message Body{
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
message Body {
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message RemoveNodeRequest {
|
||||
message Body{
|
||||
bytes key = 1;
|
||||
// Valid until block value override.
|
||||
uint32 vub = 2;
|
||||
}
|
||||
message Body {
|
||||
bytes key = 1;
|
||||
// Valid until block value override.
|
||||
uint32 vub = 2;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message RemoveNodeResponse {
|
||||
message Body{
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
message Body {
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message RemoveContainerRequest {
|
||||
message Body{
|
||||
bytes container_id = 1;
|
||||
bytes owner = 2;
|
||||
// Valid until block value override.
|
||||
uint32 vub = 3;
|
||||
}
|
||||
message Body {
|
||||
bytes container_id = 1;
|
||||
bytes owner = 2;
|
||||
// Valid until block value override.
|
||||
uint32 vub = 3;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
message RemoveContainerResponse {
|
||||
message Body{
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
message Body {
|
||||
// Valid until block value for transaction.
|
||||
uint32 vub = 1;
|
||||
}
|
||||
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
Body body = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
|
|
@ -6,24 +6,24 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/ir/
|
|||
|
||||
// Signature of some message.
|
||||
message Signature {
|
||||
// Public key used for signing.
|
||||
bytes key = 1 [json_name = "key"];
|
||||
// Public key used for signing.
|
||||
bytes key = 1 [ json_name = "key" ];
|
||||
|
||||
// Binary signature.
|
||||
bytes sign = 2 [json_name = "signature"];
|
||||
// Binary signature.
|
||||
bytes sign = 2 [ json_name = "signature" ];
|
||||
}
|
||||
|
||||
// Health status of the IR application.
|
||||
enum HealthStatus {
|
||||
// Undefined status, default value.
|
||||
HEALTH_STATUS_UNDEFINED = 0;
|
||||
// Undefined status, default value.
|
||||
HEALTH_STATUS_UNDEFINED = 0;
|
||||
|
||||
// IR application is starting.
|
||||
STARTING = 1;
|
||||
// IR application is starting.
|
||||
STARTING = 1;
|
||||
|
||||
// IR application is started and serves all services.
|
||||
READY = 2;
|
||||
// IR application is started and serves all services.
|
||||
READY = 2;
|
||||
|
||||
// IR application is shutting down.
|
||||
SHUTTING_DOWN = 3;
|
||||
// IR application is shutting down.
|
||||
SHUTTING_DOWN = 3;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ func TestGetSubTree(t *testing.T) {
|
|||
acc := subTreeAcc{errIndex: errIndex}
|
||||
err := getSubTree(context.Background(), &acc, d.CID, &GetSubTreeRequest_Body{
|
||||
TreeId: treeID,
|
||||
RootId: rootID,
|
||||
RootId: []uint64{rootID},
|
||||
Depth: depth,
|
||||
}, p)
|
||||
if errIndex == -1 {
|
||||
|
@ -58,12 +58,12 @@ func TestGetSubTree(t *testing.T) {
|
|||
}
|
||||
|
||||
// GetSubTree must return child only after is has returned the parent.
|
||||
require.Equal(t, rootID, acc.seen[0].Body.NodeId)
|
||||
require.Equal(t, rootID, acc.seen[0].Body.NodeId[0])
|
||||
loop:
|
||||
for i := 1; i < len(acc.seen); i++ {
|
||||
parent := acc.seen[i].Body.ParentId
|
||||
for j := 0; j < i; j++ {
|
||||
if acc.seen[j].Body.NodeId == parent {
|
||||
if acc.seen[j].Body.NodeId[0] == parent[0] {
|
||||
continue loop
|
||||
}
|
||||
}
|
||||
|
@ -73,16 +73,16 @@ func TestGetSubTree(t *testing.T) {
|
|||
// GetSubTree must return valid meta.
|
||||
for i := range acc.seen {
|
||||
b := acc.seen[i].Body
|
||||
meta, node, err := p.TreeGetMeta(context.Background(), d.CID, treeID, b.NodeId)
|
||||
meta, node, err := p.TreeGetMeta(context.Background(), d.CID, treeID, b.NodeId[0])
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, node, b.ParentId)
|
||||
require.Equal(t, meta.Time, b.Timestamp)
|
||||
require.Equal(t, node, b.ParentId[0])
|
||||
require.Equal(t, meta.Time, b.Timestamp[0])
|
||||
require.Equal(t, metaToProto(meta.Items), b.Meta)
|
||||
}
|
||||
|
||||
ordered := make([]uint64, len(acc.seen))
|
||||
for i := range acc.seen {
|
||||
ordered[i] = acc.seen[i].Body.NodeId
|
||||
ordered[i] = acc.seen[i].Body.NodeId[0]
|
||||
}
|
||||
return ordered
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ func testGetSubTreeOrderAsc(t *testing.T, p pilorama.ForestStorage) {
|
|||
}
|
||||
found := false
|
||||
for j := range tree {
|
||||
if acc.seen[i].Body.NodeId == tree[j].id {
|
||||
if acc.seen[i].Body.NodeId[0] == tree[j].id {
|
||||
found = true
|
||||
paths = append(paths, path.Join(tree[j].path...))
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ func testGetSubTreeOrderAsc(t *testing.T, p pilorama.ForestStorage) {
|
|||
}, p)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, acc.seen, 1)
|
||||
require.Equal(t, uint64(0), acc.seen[0].Body.NodeId)
|
||||
require.Equal(t, uint64(0), acc.seen[0].Body.NodeId[0])
|
||||
})
|
||||
t.Run("depth=2", func(t *testing.T) {
|
||||
acc := subTreeAcc{errIndex: -1}
|
||||
|
@ -220,15 +220,16 @@ func testGetSubTreeOrderAsc(t *testing.T, p pilorama.ForestStorage) {
|
|||
}, p)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, acc.seen, 3)
|
||||
require.Equal(t, uint64(0), acc.seen[0].Body.NodeId)
|
||||
require.Equal(t, uint64(0), acc.seen[1].GetBody().GetParentId())
|
||||
require.Equal(t, uint64(0), acc.seen[2].GetBody().GetParentId())
|
||||
require.Equal(t, uint64(0), acc.seen[0].Body.NodeId[0])
|
||||
require.Equal(t, uint64(0), acc.seen[1].GetBody().GetParentId()[0])
|
||||
require.Equal(t, uint64(0), acc.seen[2].GetBody().GetParentId()[0])
|
||||
})
|
||||
}
|
||||
|
||||
var (
|
||||
errSubTreeSend = errors.New("send finished with error")
|
||||
errSubTreeSendAfterError = errors.New("send was invoked after an error occurred")
|
||||
errInvalidResponse = errors.New("send got invalid response")
|
||||
)
|
||||
|
||||
type subTreeAcc struct {
|
||||
|
@ -241,6 +242,16 @@ type subTreeAcc struct {
|
|||
var _ TreeService_GetSubTreeServer = &subTreeAcc{}
|
||||
|
||||
func (s *subTreeAcc) Send(r *GetSubTreeResponse) error {
|
||||
b := r.GetBody()
|
||||
if len(b.GetNodeId()) > 1 {
|
||||
return errInvalidResponse
|
||||
}
|
||||
if len(b.GetParentId()) > 1 {
|
||||
return errInvalidResponse
|
||||
}
|
||||
if len(b.GetTimestamp()) > 1 {
|
||||
return errInvalidResponse
|
||||
}
|
||||
s.seen = append(s.seen, r)
|
||||
if s.errIndex >= 0 {
|
||||
if len(s.seen) == s.errIndex+1 {
|
||||
|
|
|
@ -16,6 +16,8 @@ import (
|
|||
netmapSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
"github.com/panjf2000/ants/v2"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// Service represents tree-service capable of working with multiple
|
||||
|
@ -440,29 +442,50 @@ func (s *Service) GetSubTree(req *GetSubTreeRequest, srv TreeService_GetSubTreeS
|
|||
return getSubTree(srv.Context(), srv, cid, b, s.forest)
|
||||
}
|
||||
|
||||
type stackItem struct {
|
||||
values []pilorama.MultiNodeInfo
|
||||
parent pilorama.MultiNode
|
||||
last *string
|
||||
}
|
||||
|
||||
func getSortedSubTree(ctx context.Context, srv TreeService_GetSubTreeServer, cid cidSDK.ID, b *GetSubTreeRequest_Body, forest pilorama.Forest) error {
|
||||
const batchSize = 1000
|
||||
|
||||
type stackItem struct {
|
||||
values []pilorama.NodeInfo
|
||||
parent pilorama.Node
|
||||
last *string
|
||||
// For backward compatibility.
|
||||
rootIDs := b.GetRootId()
|
||||
if len(rootIDs) == 0 {
|
||||
rootIDs = []uint64{0}
|
||||
}
|
||||
|
||||
// Traverse the tree in a DFS manner. Because we need to support arbitrary depth,
|
||||
// recursive implementation is not suitable here, so we maintain explicit stack.
|
||||
m, p, err := forest.TreeGetMeta(ctx, cid, b.GetTreeId(), b.GetRootId())
|
||||
if err != nil {
|
||||
return err
|
||||
var ms []pilorama.KeyValue
|
||||
var ps []uint64
|
||||
var ts []uint64
|
||||
for _, rootID := range rootIDs {
|
||||
m, p, err := forest.TreeGetMeta(ctx, cid, b.GetTreeId(), rootID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if ms == nil {
|
||||
ms = m.Items
|
||||
} else {
|
||||
if len(m.Items) != 1 {
|
||||
return status.Error(codes.InvalidArgument, "multiple non-internal nodes provided")
|
||||
}
|
||||
}
|
||||
ts = append(ts, m.Time)
|
||||
ps = append(ps, p)
|
||||
}
|
||||
|
||||
stack := []stackItem{{
|
||||
values: []pilorama.NodeInfo{{
|
||||
ID: b.GetRootId(),
|
||||
Meta: m,
|
||||
ParentID: p,
|
||||
values: []pilorama.MultiNodeInfo{{
|
||||
Children: rootIDs,
|
||||
Timestamps: ts,
|
||||
Meta: ms,
|
||||
Parents: ps,
|
||||
}},
|
||||
parent: p,
|
||||
parent: ps,
|
||||
}}
|
||||
|
||||
for {
|
||||
|
@ -486,30 +509,20 @@ func getSortedSubTree(ctx context.Context, srv TreeService_GetSubTreeServer, cid
|
|||
}
|
||||
}
|
||||
|
||||
node := stack[len(stack)-1].values[0]
|
||||
stack[len(stack)-1].values = stack[len(stack)-1].values[1:]
|
||||
|
||||
err = srv.Send(&GetSubTreeResponse{
|
||||
Body: &GetSubTreeResponse_Body{
|
||||
NodeId: node.ID,
|
||||
ParentId: node.ParentID,
|
||||
Timestamp: node.Meta.Time,
|
||||
Meta: metaToProto(node.Meta.Items),
|
||||
},
|
||||
})
|
||||
node, err := stackPopAndSend(stack, srv)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if b.GetDepth() == 0 || uint32(len(stack)) < b.GetDepth() {
|
||||
children, last, err := forest.TreeSortedByFilename(ctx, cid, b.GetTreeId(), node.ID, nil, batchSize)
|
||||
children, last, err := forest.TreeSortedByFilename(ctx, cid, b.GetTreeId(), node.Children, nil, batchSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(children) != 0 {
|
||||
stack = append(stack, stackItem{
|
||||
values: children,
|
||||
parent: node.ID,
|
||||
parent: node.Children,
|
||||
last: last,
|
||||
})
|
||||
}
|
||||
|
@ -518,19 +531,38 @@ func getSortedSubTree(ctx context.Context, srv TreeService_GetSubTreeServer, cid
|
|||
return nil
|
||||
}
|
||||
|
||||
func stackPopAndSend(stack []stackItem, srv TreeService_GetSubTreeServer) (pilorama.MultiNodeInfo, error) {
|
||||
node := stack[len(stack)-1].values[0]
|
||||
stack[len(stack)-1].values = stack[len(stack)-1].values[1:]
|
||||
|
||||
return node, srv.Send(&GetSubTreeResponse{
|
||||
Body: &GetSubTreeResponse_Body{
|
||||
NodeId: node.Children,
|
||||
ParentId: node.Parents,
|
||||
Timestamp: node.Timestamps,
|
||||
Meta: metaToProto(node.Meta),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func getSubTree(ctx context.Context, srv TreeService_GetSubTreeServer, cid cidSDK.ID, b *GetSubTreeRequest_Body, forest pilorama.Forest) error {
|
||||
if b.GetOrderBy().GetDirection() == GetSubTreeRequest_Body_Order_Asc {
|
||||
return getSortedSubTree(ctx, srv, cid, b, forest)
|
||||
}
|
||||
|
||||
var rootID uint64
|
||||
if len(b.GetRootId()) > 0 {
|
||||
rootID = b.GetRootId()[0]
|
||||
}
|
||||
|
||||
// Traverse the tree in a DFS manner. Because we need to support arbitrary depth,
|
||||
// recursive implementation is not suitable here, so we maintain explicit stack.
|
||||
m, p, err := forest.TreeGetMeta(ctx, cid, b.GetTreeId(), b.GetRootId())
|
||||
m, p, err := forest.TreeGetMeta(ctx, cid, b.GetTreeId(), rootID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
stack := [][]pilorama.NodeInfo{{{
|
||||
ID: b.GetRootId(),
|
||||
ID: rootID,
|
||||
Meta: m,
|
||||
ParentID: p,
|
||||
}}}
|
||||
|
@ -548,9 +580,9 @@ func getSubTree(ctx context.Context, srv TreeService_GetSubTreeServer, cid cidSD
|
|||
|
||||
err = srv.Send(&GetSubTreeResponse{
|
||||
Body: &GetSubTreeResponse_Body{
|
||||
NodeId: node.ID,
|
||||
ParentId: node.ParentID,
|
||||
Timestamp: node.Meta.Time,
|
||||
NodeId: []uint64{node.ID},
|
||||
ParentId: []uint64{node.ParentID},
|
||||
Timestamp: []uint64{node.Meta.Time},
|
||||
Meta: metaToProto(node.Meta.Items),
|
||||
},
|
||||
})
|
||||
|
|
414
pkg/services/tree/service.pb.go
generated
414
pkg/services/tree/service.pb.go
generated
|
@ -3,7 +3,7 @@
|
|||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v4.25.0
|
||||
// source: pkg/services/tree/service.proto
|
||||
|
||||
|
@ -1979,8 +1979,8 @@ type GetSubTreeRequest_Body struct {
|
|||
ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||
// The name of the tree.
|
||||
TreeId string `protobuf:"bytes,2,opt,name=tree_id,json=treeId,proto3" json:"tree_id,omitempty"`
|
||||
// ID of the root node of a subtree.
|
||||
RootId uint64 `protobuf:"varint,3,opt,name=root_id,json=rootId,proto3" json:"root_id,omitempty"`
|
||||
// IDs of the root nodes of a subtree forest.
|
||||
RootId []uint64 `protobuf:"varint,3,rep,name=root_id,json=rootId,proto3" json:"root_id,omitempty"`
|
||||
// Optional depth of the traversal. Zero means return only root.
|
||||
// Maximum depth is 10.
|
||||
Depth uint32 `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"`
|
||||
|
@ -2036,11 +2036,11 @@ func (x *GetSubTreeRequest_Body) GetTreeId() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *GetSubTreeRequest_Body) GetRootId() uint64 {
|
||||
func (x *GetSubTreeRequest_Body) GetRootId() []uint64 {
|
||||
if x != nil {
|
||||
return x.RootId
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetSubTreeRequest_Body) GetDepth() uint32 {
|
||||
|
@ -2117,11 +2117,11 @@ type GetSubTreeResponse_Body struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// ID of the node.
|
||||
NodeId uint64 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
||||
NodeId []uint64 `protobuf:"varint,1,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
||||
// ID of the parent.
|
||||
ParentId uint64 `protobuf:"varint,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
|
||||
ParentId []uint64 `protobuf:"varint,2,rep,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
|
||||
// Time node was first added to a tree.
|
||||
Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Timestamp []uint64 `protobuf:"varint,3,rep,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
// Node meta-information.
|
||||
Meta []*KeyValue `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"`
|
||||
}
|
||||
|
@ -2158,25 +2158,25 @@ func (*GetSubTreeResponse_Body) Descriptor() ([]byte, []int) {
|
|||
return file_pkg_services_tree_service_proto_rawDescGZIP(), []int{11, 0}
|
||||
}
|
||||
|
||||
func (x *GetSubTreeResponse_Body) GetNodeId() uint64 {
|
||||
func (x *GetSubTreeResponse_Body) GetNodeId() []uint64 {
|
||||
if x != nil {
|
||||
return x.NodeId
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetSubTreeResponse_Body) GetParentId() uint64 {
|
||||
func (x *GetSubTreeResponse_Body) GetParentId() []uint64 {
|
||||
if x != nil {
|
||||
return x.ParentId
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetSubTreeResponse_Body) GetTimestamp() uint64 {
|
||||
func (x *GetSubTreeResponse_Body) GetTimestamp() []uint64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetSubTreeResponse_Body) GetMeta() []*KeyValue {
|
||||
|
@ -2742,173 +2742,175 @@ var file_pkg_services_tree_service_proto_rawDesc = []byte{
|
|||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x73, 0x22, 0xbf, 0x03, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65,
|
||||
0x73, 0x22, 0xc3, 0x03, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42,
|
||||
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xc8, 0x02, 0x0a, 0x04, 0x42, 0x6f, 0x64,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xcc, 0x02, 0x0a, 0x04, 0x42, 0x6f, 0x64,
|
||||
0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a,
|
||||
0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06,
|
||||
0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c,
|
||||
0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x3d, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54,
|
||||
0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x1a, 0x73,
|
||||
0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x44,
|
||||
0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x73,
|
||||
0x63, 0x10, 0x01, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72,
|
||||
0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f,
|
||||
0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a,
|
||||
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x7e, 0x0a, 0x04,
|
||||
0x42, 0x6f, 0x64, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b, 0x65,
|
||||
0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x9b, 0x01, 0x0a,
|
||||
0x0f, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a,
|
||||
0x29, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x54,
|
||||
0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
||||
0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a,
|
||||
0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x41, 0x70,
|
||||
0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x6f,
|
||||
0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64,
|
||||
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x6f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21,
|
||||
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
|
||||
0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x09, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70,
|
||||
0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79,
|
||||
0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xe2, 0x01,
|
||||
0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a,
|
||||
0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02,
|
||||
0x10, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65,
|
||||
0x70, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68,
|
||||
0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42,
|
||||
0x6f, 0x64, 0x79, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x42, 0x79, 0x1a, 0x73, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x64,
|
||||
0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69,
|
||||
0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x07,
|
||||
0x0a, 0x03, 0x41, 0x73, 0x63, 0x10, 0x01, 0x22, 0x83, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53,
|
||||
0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31,
|
||||
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x1a, 0x8a, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1b, 0x0a, 0x07, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x06,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x08, 0x70,
|
||||
0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x02, 0x10, 0x00, 0x52, 0x09,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4b,
|
||||
0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x9b, 0x01,
|
||||
0x0a, 0x0f, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52,
|
||||
0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x1a, 0x70, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x1a, 0x29, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72,
|
||||
0x65, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x10,
|
||||
0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x41,
|
||||
0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x62,
|
||||
0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f,
|
||||
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x33, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12,
|
||||
0x2b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f, 0x76,
|
||||
0x65, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a,
|
||||
0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
|
||||
0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f,
|
||||
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22,
|
||||
0x7e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f,
|
||||
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x32,
|
||||
0xd6, 0x04, 0x0a, 0x0b, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x2a, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x41,
|
||||
0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74,
|
||||
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x52, 0x65, 0x6d,
|
||||
0x6f, 0x76, 0x65, 0x12, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e,
|
||||
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d,
|
||||
0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x6f,
|
||||
0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a,
|
||||
0x0d, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50,
|
||||
0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75,
|
||||
0x62, 0x54, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x08, 0x54, 0x72,
|
||||
0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72,
|
||||
0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x12,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x70,
|
||||
0x4c, 0x6f, 0x67, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70,
|
||||
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
|
||||
0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e,
|
||||
0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75,
|
||||
0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||
0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x6f, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12,
|
||||
0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x09, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41,
|
||||
0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64,
|
||||
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xe2,
|
||||
0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f,
|
||||
0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x1a, 0x70, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07,
|
||||
0x74, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
|
||||
0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42,
|
||||
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x33, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79,
|
||||
0x12, 0x2b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x6f,
|
||||
0x76, 0x65, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01,
|
||||
0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
||||
0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42,
|
||||
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79,
|
||||
0x22, 0x7e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c,
|
||||
0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42,
|
||||
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79,
|
||||
0x32, 0xd6, 0x04, 0x0a, 0x0b, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x2a, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41,
|
||||
0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09,
|
||||
0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x42, 0x79, 0x50, 0x61,
|
||||
0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x12, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x65, 0x65,
|
||||
0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x2d, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x4d,
|
||||
0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x65, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48,
|
||||
0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12,
|
||||
0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79,
|
||||
0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x79, 0x50, 0x61, 0x74, 0x68,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53,
|
||||
0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x54, 0x72, 0x65,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x08, 0x54,
|
||||
0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54,
|
||||
0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12,
|
||||
0x12, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f,
|
||||
0x70, 0x4c, 0x6f, 0x67, 0x12, 0x15, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f,
|
||||
0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c,
|
||||
0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74,
|
||||
0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72,
|
||||
0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74,
|
||||
0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -2925,7 +2927,7 @@ func file_pkg_services_tree_service_proto_rawDescGZIP() []byte {
|
|||
|
||||
var file_pkg_services_tree_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_pkg_services_tree_service_proto_msgTypes = make([]protoimpl.MessageInfo, 42)
|
||||
var file_pkg_services_tree_service_proto_goTypes = []interface{}{
|
||||
var file_pkg_services_tree_service_proto_goTypes = []any{
|
||||
(GetSubTreeRequest_Body_Order_Direction)(0), // 0: tree.GetSubTreeRequest.Body.Order.Direction
|
||||
(*AddRequest)(nil), // 1: tree.AddRequest
|
||||
(*AddResponse)(nil), // 2: tree.AddResponse
|
||||
|
@ -3058,7 +3060,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
}
|
||||
file_pkg_services_tree_types_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pkg_services_tree_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3070,7 +3072,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3082,7 +3084,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddByPathRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3094,7 +3096,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddByPathResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3106,7 +3108,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3118,7 +3120,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3130,7 +3132,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*MoveRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3142,7 +3144,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*MoveResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3154,7 +3156,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetNodeByPathRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3166,7 +3168,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetNodeByPathResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3178,7 +3180,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetSubTreeRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3190,7 +3192,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetSubTreeResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3202,7 +3204,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*TreeListRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3214,7 +3216,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*TreeListResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3226,7 +3228,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[14].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ApplyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3238,7 +3240,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[15].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ApplyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3250,7 +3252,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[16].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetOpLogRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3262,7 +3264,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[17].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetOpLogResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3274,7 +3276,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[18].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HealthcheckResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3286,7 +3288,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[19].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HealthcheckRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3298,7 +3300,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[20].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3310,7 +3312,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[21].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3322,7 +3324,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[22].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddByPathRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3334,7 +3336,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[23].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddByPathResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3346,7 +3348,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[24].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3358,7 +3360,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[25].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3370,7 +3372,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[26].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*MoveRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3382,7 +3384,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[27].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*MoveResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3394,7 +3396,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[28].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetNodeByPathRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3406,7 +3408,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[29].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetNodeByPathResponse_Info); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3418,7 +3420,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[30].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetNodeByPathResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3430,7 +3432,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[31].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetSubTreeRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3442,7 +3444,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[32].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetSubTreeRequest_Body_Order); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3454,7 +3456,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[33].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetSubTreeResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3466,7 +3468,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[34].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*TreeListRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3478,7 +3480,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[35].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*TreeListResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3490,7 +3492,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[36].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ApplyRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3502,7 +3504,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[37].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ApplyResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3514,7 +3516,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[38].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetOpLogRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3526,7 +3528,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[39].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetOpLogResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3538,7 +3540,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[40].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HealthcheckResponse_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3550,7 +3552,7 @@ func file_pkg_services_tree_service_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_service_proto_msgTypes[41].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HealthcheckRequest_Body); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
|
@ -28,25 +28,25 @@ service TreeService {
|
|||
// Otherwise, a request is denied.
|
||||
|
||||
// Add adds new node to the tree. Invoked by a client.
|
||||
rpc Add (AddRequest) returns (AddResponse);
|
||||
rpc Add(AddRequest) returns (AddResponse);
|
||||
// AddByPath adds new node to the tree by path. Invoked by a client.
|
||||
rpc AddByPath (AddByPathRequest) returns (AddByPathResponse);
|
||||
rpc AddByPath(AddByPathRequest) returns (AddByPathResponse);
|
||||
// Remove removes node from the tree. Invoked by a client.
|
||||
rpc Remove (RemoveRequest) returns (RemoveResponse);
|
||||
rpc Remove(RemoveRequest) returns (RemoveResponse);
|
||||
// Move moves node from one parent to another. Invoked by a client.
|
||||
rpc Move (MoveRequest) returns (MoveResponse);
|
||||
rpc Move(MoveRequest) returns (MoveResponse);
|
||||
// GetNodeByPath returns list of IDs corresponding to a specific filepath.
|
||||
rpc GetNodeByPath (GetNodeByPathRequest) returns (GetNodeByPathResponse);
|
||||
rpc GetNodeByPath(GetNodeByPathRequest) returns (GetNodeByPathResponse);
|
||||
// GetSubTree returns tree corresponding to a specific node.
|
||||
rpc GetSubTree (GetSubTreeRequest) returns (stream GetSubTreeResponse);
|
||||
rpc GetSubTree(GetSubTreeRequest) returns (stream GetSubTreeResponse);
|
||||
// TreeList return list of the existing trees in the container.
|
||||
rpc TreeList (TreeListRequest) returns (TreeListResponse);
|
||||
rpc TreeList(TreeListRequest) returns (TreeListResponse);
|
||||
|
||||
/* Synchronization API */
|
||||
|
||||
// Apply pushes log operation from another node to the current.
|
||||
// The request must be signed by a container node.
|
||||
rpc Apply (ApplyRequest) returns (ApplyResponse);
|
||||
rpc Apply(ApplyRequest) returns (ApplyResponse);
|
||||
// GetOpLog returns a stream of logged operations starting from some height.
|
||||
rpc GetOpLog(GetOpLogRequest) returns (stream GetOpLogResponse);
|
||||
// Healthcheck is a dummy rpc to check service availability
|
||||
|
@ -85,7 +85,6 @@ message AddResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message AddByPathRequest {
|
||||
message Body {
|
||||
// Container ID in V2 format.
|
||||
|
@ -122,7 +121,6 @@ message AddByPathResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message RemoveRequest {
|
||||
message Body {
|
||||
// Container ID in V2 format.
|
||||
|
@ -142,8 +140,7 @@ message RemoveRequest {
|
|||
}
|
||||
|
||||
message RemoveResponse {
|
||||
message Body {
|
||||
}
|
||||
message Body {}
|
||||
|
||||
// Response body.
|
||||
Body body = 1;
|
||||
|
@ -151,7 +148,6 @@ message RemoveResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message MoveRequest {
|
||||
message Body {
|
||||
// TODO import neo.fs.v2.refs.ContainerID directly.
|
||||
|
@ -176,8 +172,7 @@ message MoveRequest {
|
|||
}
|
||||
|
||||
message MoveResponse {
|
||||
message Body {
|
||||
}
|
||||
message Body {}
|
||||
|
||||
// Response body.
|
||||
Body body = 1;
|
||||
|
@ -185,7 +180,6 @@ message MoveResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message GetNodeByPathRequest {
|
||||
message Body {
|
||||
// Container ID in V2 format.
|
||||
|
@ -235,7 +229,6 @@ message GetNodeByPathResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message GetSubTreeRequest {
|
||||
message Body {
|
||||
message Order {
|
||||
|
@ -249,8 +242,8 @@ message GetSubTreeRequest {
|
|||
bytes container_id = 1;
|
||||
// The name of the tree.
|
||||
string tree_id = 2;
|
||||
// ID of the root node of a subtree.
|
||||
uint64 root_id = 3;
|
||||
// IDs of the root nodes of a subtree forest.
|
||||
repeated uint64 root_id = 3 [ packed = false ];
|
||||
// Optional depth of the traversal. Zero means return only root.
|
||||
// Maximum depth is 10.
|
||||
uint32 depth = 4;
|
||||
|
@ -269,11 +262,11 @@ message GetSubTreeRequest {
|
|||
message GetSubTreeResponse {
|
||||
message Body {
|
||||
// ID of the node.
|
||||
uint64 node_id = 1;
|
||||
repeated uint64 node_id = 1 [ packed = false ];
|
||||
// ID of the parent.
|
||||
uint64 parent_id = 2;
|
||||
repeated uint64 parent_id = 2 [ packed = false ];
|
||||
// Time node was first added to a tree.
|
||||
uint64 timestamp = 3;
|
||||
repeated uint64 timestamp = 3 [ packed = false ];
|
||||
// Node meta-information.
|
||||
repeated KeyValue meta = 4;
|
||||
}
|
||||
|
@ -307,7 +300,6 @@ message TreeListResponse {
|
|||
Signature signature = 2;
|
||||
}
|
||||
|
||||
|
||||
message ApplyRequest {
|
||||
message Body {
|
||||
// Container ID in V2 format.
|
||||
|
@ -325,8 +317,7 @@ message ApplyRequest {
|
|||
}
|
||||
|
||||
message ApplyResponse {
|
||||
message Body {
|
||||
}
|
||||
message Body {}
|
||||
|
||||
// Response body.
|
||||
Body body = 1;
|
||||
|
@ -334,7 +325,6 @@ message ApplyResponse {
|
|||
Signature signature = 2;
|
||||
};
|
||||
|
||||
|
||||
message GetOpLogRequest {
|
||||
message Body {
|
||||
// Container ID in V2 format.
|
||||
|
@ -366,8 +356,7 @@ message GetOpLogResponse {
|
|||
};
|
||||
|
||||
message HealthcheckResponse {
|
||||
message Body {
|
||||
}
|
||||
message Body {}
|
||||
|
||||
// Response body.
|
||||
Body body = 1;
|
||||
|
@ -376,8 +365,7 @@ message HealthcheckResponse {
|
|||
};
|
||||
|
||||
message HealthcheckRequest {
|
||||
message Body {
|
||||
}
|
||||
message Body {}
|
||||
|
||||
// Request body.
|
||||
Body body = 1;
|
||||
|
|
53
pkg/services/tree/service_frostfs.pb.go
generated
53
pkg/services/tree/service_frostfs.pb.go
generated
|
@ -2,6 +2,11 @@
|
|||
|
||||
package tree
|
||||
|
||||
import (
|
||||
binary "encoding/binary"
|
||||
protowire "google.golang.org/protobuf/encoding/protowire"
|
||||
)
|
||||
|
||||
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
|
||||
// StableSize returns the size of x in protobuf format.
|
||||
|
@ -995,7 +1000,9 @@ func (x *GetSubTreeRequest_Body) StableSize() (size int) {
|
|||
}
|
||||
size += proto.BytesSize(1, x.ContainerId)
|
||||
size += proto.StringSize(2, x.TreeId)
|
||||
size += proto.UInt64Size(3, x.RootId)
|
||||
for i := range x.RootId {
|
||||
size += protowire.SizeGroup(protowire.Number(3), protowire.SizeVarint(x.RootId[i]))
|
||||
}
|
||||
size += proto.UInt32Size(4, x.Depth)
|
||||
size += proto.BytesSize(5, x.BearerToken)
|
||||
size += proto.NestedStructureSize(6, x.OrderBy)
|
||||
|
@ -1020,7 +1027,13 @@ func (x *GetSubTreeRequest_Body) StableMarshal(buf []byte) []byte {
|
|||
var offset int
|
||||
offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId)
|
||||
offset += proto.StringMarshal(2, buf[offset:], x.TreeId)
|
||||
offset += proto.UInt64Marshal(3, buf[offset:], x.RootId)
|
||||
for i := range x.RootId {
|
||||
{
|
||||
prefix := protowire.EncodeTag(protowire.Number(3), protowire.VarintType)
|
||||
offset += binary.PutUvarint(buf[offset:], uint64(prefix))
|
||||
offset += binary.PutUvarint(buf[offset:], x.RootId[i])
|
||||
}
|
||||
}
|
||||
offset += proto.UInt32Marshal(4, buf[offset:], x.Depth)
|
||||
offset += proto.BytesMarshal(5, buf[offset:], x.BearerToken)
|
||||
offset += proto.NestedStructureMarshal(6, buf[offset:], x.OrderBy)
|
||||
|
@ -1089,9 +1102,15 @@ func (x *GetSubTreeResponse_Body) StableSize() (size int) {
|
|||
if x == nil {
|
||||
return 0
|
||||
}
|
||||
size += proto.UInt64Size(1, x.NodeId)
|
||||
size += proto.UInt64Size(2, x.ParentId)
|
||||
size += proto.UInt64Size(3, x.Timestamp)
|
||||
for i := range x.NodeId {
|
||||
size += protowire.SizeGroup(protowire.Number(1), protowire.SizeVarint(x.NodeId[i]))
|
||||
}
|
||||
for i := range x.ParentId {
|
||||
size += protowire.SizeGroup(protowire.Number(2), protowire.SizeVarint(x.ParentId[i]))
|
||||
}
|
||||
for i := range x.Timestamp {
|
||||
size += protowire.SizeGroup(protowire.Number(3), protowire.SizeVarint(x.Timestamp[i]))
|
||||
}
|
||||
for i := range x.Meta {
|
||||
size += proto.NestedStructureSize(4, x.Meta[i])
|
||||
}
|
||||
|
@ -1114,9 +1133,27 @@ func (x *GetSubTreeResponse_Body) StableMarshal(buf []byte) []byte {
|
|||
buf = make([]byte, x.StableSize())
|
||||
}
|
||||
var offset int
|
||||
offset += proto.UInt64Marshal(1, buf[offset:], x.NodeId)
|
||||
offset += proto.UInt64Marshal(2, buf[offset:], x.ParentId)
|
||||
offset += proto.UInt64Marshal(3, buf[offset:], x.Timestamp)
|
||||
for i := range x.NodeId {
|
||||
{
|
||||
prefix := protowire.EncodeTag(protowire.Number(1), protowire.VarintType)
|
||||
offset += binary.PutUvarint(buf[offset:], uint64(prefix))
|
||||
offset += binary.PutUvarint(buf[offset:], x.NodeId[i])
|
||||
}
|
||||
}
|
||||
for i := range x.ParentId {
|
||||
{
|
||||
prefix := protowire.EncodeTag(protowire.Number(2), protowire.VarintType)
|
||||
offset += binary.PutUvarint(buf[offset:], uint64(prefix))
|
||||
offset += binary.PutUvarint(buf[offset:], x.ParentId[i])
|
||||
}
|
||||
}
|
||||
for i := range x.Timestamp {
|
||||
{
|
||||
prefix := protowire.EncodeTag(protowire.Number(3), protowire.VarintType)
|
||||
offset += binary.PutUvarint(buf[offset:], uint64(prefix))
|
||||
offset += binary.PutUvarint(buf[offset:], x.Timestamp[i])
|
||||
}
|
||||
}
|
||||
for i := range x.Meta {
|
||||
offset += proto.NestedStructureMarshal(4, buf[offset:], x.Meta[i])
|
||||
}
|
||||
|
|
10
pkg/services/tree/types.pb.go
generated
10
pkg/services/tree/types.pb.go
generated
|
@ -3,7 +3,7 @@
|
|||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v4.25.0
|
||||
// source: pkg/services/tree/types.proto
|
||||
|
||||
|
@ -243,7 +243,7 @@ func file_pkg_services_tree_types_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_pkg_services_tree_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_pkg_services_tree_types_proto_goTypes = []interface{}{
|
||||
var file_pkg_services_tree_types_proto_goTypes = []any{
|
||||
(*KeyValue)(nil), // 0: tree.KeyValue
|
||||
(*LogMove)(nil), // 1: tree.LogMove
|
||||
(*Signature)(nil), // 2: tree.Signature
|
||||
|
@ -262,7 +262,7 @@ func file_pkg_services_tree_types_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pkg_services_tree_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_types_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*KeyValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -274,7 +274,7 @@ func file_pkg_services_tree_types_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_types_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*LogMove); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -286,7 +286,7 @@ func file_pkg_services_tree_types_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_services_tree_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_pkg_services_tree_types_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Signature); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
|
@ -10,25 +10,25 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/tre
|
|||
// KeyValue represents key-value pair attached to an object.
|
||||
message KeyValue {
|
||||
// Attribute name.
|
||||
string key = 1 [json_name = "key"];
|
||||
string key = 1 [ json_name = "key" ];
|
||||
// Attribute value.
|
||||
bytes value = 2 [json_name = "value"];
|
||||
bytes value = 2 [ json_name = "value" ];
|
||||
}
|
||||
|
||||
// LogMove represents log-entry for a single move operation.
|
||||
message LogMove {
|
||||
// ID of the parent node.
|
||||
uint64 parent_id = 1 [json_name = "parentID"];
|
||||
uint64 parent_id = 1 [ json_name = "parentID" ];
|
||||
// Node meta information, including operation timestamp.
|
||||
bytes meta = 2 [json_name = "meta"];
|
||||
bytes meta = 2 [ json_name = "meta" ];
|
||||
// ID of the node to move.
|
||||
uint64 child_id = 3 [json_name = "childID"];
|
||||
uint64 child_id = 3 [ json_name = "childID" ];
|
||||
}
|
||||
|
||||
// Signature of a message.
|
||||
message Signature {
|
||||
// Serialized public key as defined in FrostFS API.
|
||||
bytes key = 1 [json_name = "key"];
|
||||
bytes key = 1 [ json_name = "key" ];
|
||||
// Signature of a message body.
|
||||
bytes sign = 2 [json_name = "signature"];
|
||||
bytes sign = 2 [ json_name = "signature" ];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue
This has changed compared to master (
slices.Contains
) because of go1.20 requirement in this branch.Please, re-check the correctness.