Merge pull request #870 from codysoyland/grpc-compat

Fully backwards-compatible VDSM gRPC interface
This commit is contained in:
Cody Soyland 2020-09-29 15:58:20 -06:00 committed by GitHub
commit 86c5e040b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 1320 additions and 654 deletions

View file

@ -166,9 +166,14 @@ generate-stringer:
generate-pql: require-peg
cd pql && peg -inline pql.peg && cd ..
# dunno if protoc-gen-gofast is actually needed here
generate-proto-grpc: require-protoc require-protoc-gen-gofast
generate-proto-grpc: require-protoc require-protoc-gen-go
protoc -I proto proto/pilosa.proto --go_out=plugins=grpc:proto
protoc -I proto proto/vdsm/vdsm.proto --go_out=plugins=grpc:proto
# TODO: Modify above commands and remove the below mv if possible.
# See https://go-review.googlesource.com/c/protobuf/+/219298/ for info on --go-opt
# I couldn't get it to work during development - Cody
cp -r proto/github.com/pilosa/pilosa/v2/proto/ proto/
rm -rf proto/github.com
# `go generate` all needed packages
generate: generate-protoc generate-statik generate-stringer generate-pql
@ -386,6 +391,9 @@ install-stringer:
install-protoc-gen-gofast:
GO111MODULE=off go get -u github.com/gogo/protobuf/protoc-gen-gofast
install-protoc-gen-go:
GO111MODULE=off go get -u github.com/golang/protobuf/protoc-gen-go
install-protoc:
@echo This tool cannot automatically install protoc. Please download and install protoc from https://google.github.io/proto-lens/installing-protoc.html

View file

@ -19,3 +19,5 @@
./cmd/pilosa-keydump/vprint.go
./cmd/pilosa-keydump/keydump.go
./synthload/vprint.go
./proto/vdsm/vdsm.proto
./proto/vdsm/vdsm.pb.go

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package pilosa
package proto
import (
"fmt"

View file

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pilosa.proto
package pilosa
package proto
import (
context "context"
@ -24,349 +24,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type VDS struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VDS) Reset() { *m = VDS{} }
func (m *VDS) String() string { return proto.CompactTextString(m) }
func (*VDS) ProtoMessage() {}
func (*VDS) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{0}
}
func (m *VDS) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VDS.Unmarshal(m, b)
}
func (m *VDS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VDS.Marshal(b, m, deterministic)
}
func (m *VDS) XXX_Merge(src proto.Message) {
xxx_messageInfo_VDS.Merge(m, src)
}
func (m *VDS) XXX_Size() int {
return xxx_messageInfo_VDS.Size(m)
}
func (m *VDS) XXX_DiscardUnknown() {
xxx_messageInfo_VDS.DiscardUnknown(m)
}
var xxx_messageInfo_VDS proto.InternalMessageInfo
func (m *VDS) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type GetVDSsRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetVDSsRequest) Reset() { *m = GetVDSsRequest{} }
func (m *GetVDSsRequest) String() string { return proto.CompactTextString(m) }
func (*GetVDSsRequest) ProtoMessage() {}
func (*GetVDSsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{1}
}
func (m *GetVDSsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetVDSsRequest.Unmarshal(m, b)
}
func (m *GetVDSsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetVDSsRequest.Marshal(b, m, deterministic)
}
func (m *GetVDSsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetVDSsRequest.Merge(m, src)
}
func (m *GetVDSsRequest) XXX_Size() int {
return xxx_messageInfo_GetVDSsRequest.Size(m)
}
func (m *GetVDSsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetVDSsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetVDSsRequest proto.InternalMessageInfo
type GetVDSsResponse struct {
Vdss []*VDS `protobuf:"bytes,1,rep,name=vdss,proto3" json:"vdss,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetVDSsResponse) Reset() { *m = GetVDSsResponse{} }
func (m *GetVDSsResponse) String() string { return proto.CompactTextString(m) }
func (*GetVDSsResponse) ProtoMessage() {}
func (*GetVDSsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{2}
}
func (m *GetVDSsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetVDSsResponse.Unmarshal(m, b)
}
func (m *GetVDSsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetVDSsResponse.Marshal(b, m, deterministic)
}
func (m *GetVDSsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetVDSsResponse.Merge(m, src)
}
func (m *GetVDSsResponse) XXX_Size() int {
return xxx_messageInfo_GetVDSsResponse.Size(m)
}
func (m *GetVDSsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetVDSsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetVDSsResponse proto.InternalMessageInfo
func (m *GetVDSsResponse) GetVdss() []*VDS {
if m != nil {
return m.Vdss
}
return nil
}
type GetVDSRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetVDSRequest) Reset() { *m = GetVDSRequest{} }
func (m *GetVDSRequest) String() string { return proto.CompactTextString(m) }
func (*GetVDSRequest) ProtoMessage() {}
func (*GetVDSRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{3}
}
func (m *GetVDSRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetVDSRequest.Unmarshal(m, b)
}
func (m *GetVDSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetVDSRequest.Marshal(b, m, deterministic)
}
func (m *GetVDSRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetVDSRequest.Merge(m, src)
}
func (m *GetVDSRequest) XXX_Size() int {
return xxx_messageInfo_GetVDSRequest.Size(m)
}
func (m *GetVDSRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetVDSRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetVDSRequest proto.InternalMessageInfo
func (m *GetVDSRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type GetVDSResponse struct {
Vds *VDS `protobuf:"bytes,1,opt,name=vds,proto3" json:"vds,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetVDSResponse) Reset() { *m = GetVDSResponse{} }
func (m *GetVDSResponse) String() string { return proto.CompactTextString(m) }
func (*GetVDSResponse) ProtoMessage() {}
func (*GetVDSResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{4}
}
func (m *GetVDSResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetVDSResponse.Unmarshal(m, b)
}
func (m *GetVDSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetVDSResponse.Marshal(b, m, deterministic)
}
func (m *GetVDSResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetVDSResponse.Merge(m, src)
}
func (m *GetVDSResponse) XXX_Size() int {
return xxx_messageInfo_GetVDSResponse.Size(m)
}
func (m *GetVDSResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetVDSResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetVDSResponse proto.InternalMessageInfo
func (m *GetVDSResponse) GetVds() *VDS {
if m != nil {
return m.Vds
}
return nil
}
type PostVDSRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"`
TrackExistence bool `protobuf:"varint,3,opt,name=trackExistence,proto3" json:"trackExistence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PostVDSRequest) Reset() { *m = PostVDSRequest{} }
func (m *PostVDSRequest) String() string { return proto.CompactTextString(m) }
func (*PostVDSRequest) ProtoMessage() {}
func (*PostVDSRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{5}
}
func (m *PostVDSRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PostVDSRequest.Unmarshal(m, b)
}
func (m *PostVDSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PostVDSRequest.Marshal(b, m, deterministic)
}
func (m *PostVDSRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PostVDSRequest.Merge(m, src)
}
func (m *PostVDSRequest) XXX_Size() int {
return xxx_messageInfo_PostVDSRequest.Size(m)
}
func (m *PostVDSRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PostVDSRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PostVDSRequest proto.InternalMessageInfo
func (m *PostVDSRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *PostVDSRequest) GetKeys() bool {
if m != nil {
return m.Keys
}
return false
}
func (m *PostVDSRequest) GetTrackExistence() bool {
if m != nil {
return m.TrackExistence
}
return false
}
type PostVDSResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PostVDSResponse) Reset() { *m = PostVDSResponse{} }
func (m *PostVDSResponse) String() string { return proto.CompactTextString(m) }
func (*PostVDSResponse) ProtoMessage() {}
func (*PostVDSResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{6}
}
func (m *PostVDSResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PostVDSResponse.Unmarshal(m, b)
}
func (m *PostVDSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PostVDSResponse.Marshal(b, m, deterministic)
}
func (m *PostVDSResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PostVDSResponse.Merge(m, src)
}
func (m *PostVDSResponse) XXX_Size() int {
return xxx_messageInfo_PostVDSResponse.Size(m)
}
func (m *PostVDSResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PostVDSResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PostVDSResponse proto.InternalMessageInfo
type DeleteVDSRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteVDSRequest) Reset() { *m = DeleteVDSRequest{} }
func (m *DeleteVDSRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteVDSRequest) ProtoMessage() {}
func (*DeleteVDSRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{7}
}
func (m *DeleteVDSRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteVDSRequest.Unmarshal(m, b)
}
func (m *DeleteVDSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteVDSRequest.Marshal(b, m, deterministic)
}
func (m *DeleteVDSRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteVDSRequest.Merge(m, src)
}
func (m *DeleteVDSRequest) XXX_Size() int {
return xxx_messageInfo_DeleteVDSRequest.Size(m)
}
func (m *DeleteVDSRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteVDSRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteVDSRequest proto.InternalMessageInfo
func (m *DeleteVDSRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type DeleteVDSResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteVDSResponse) Reset() { *m = DeleteVDSResponse{} }
func (m *DeleteVDSResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteVDSResponse) ProtoMessage() {}
func (*DeleteVDSResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{8}
}
func (m *DeleteVDSResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteVDSResponse.Unmarshal(m, b)
}
func (m *DeleteVDSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteVDSResponse.Marshal(b, m, deterministic)
}
func (m *DeleteVDSResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteVDSResponse.Merge(m, src)
}
func (m *DeleteVDSResponse) XXX_Size() int {
return xxx_messageInfo_DeleteVDSResponse.Size(m)
}
func (m *DeleteVDSResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteVDSResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteVDSResponse proto.InternalMessageInfo
type QueryPQLRequest struct {
Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
Pql string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"`
@ -379,7 +36,7 @@ func (m *QueryPQLRequest) Reset() { *m = QueryPQLRequest{} }
func (m *QueryPQLRequest) String() string { return proto.CompactTextString(m) }
func (*QueryPQLRequest) ProtoMessage() {}
func (*QueryPQLRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{9}
return fileDescriptor_ef0691a44d1e275c, []int{0}
}
func (m *QueryPQLRequest) XXX_Unmarshal(b []byte) error {
@ -425,7 +82,7 @@ func (m *QuerySQLRequest) Reset() { *m = QuerySQLRequest{} }
func (m *QuerySQLRequest) String() string { return proto.CompactTextString(m) }
func (*QuerySQLRequest) ProtoMessage() {}
func (*QuerySQLRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{10}
return fileDescriptor_ef0691a44d1e275c, []int{1}
}
func (m *QuerySQLRequest) XXX_Unmarshal(b []byte) error {
@ -465,7 +122,7 @@ func (m *StatusError) Reset() { *m = StatusError{} }
func (m *StatusError) String() string { return proto.CompactTextString(m) }
func (*StatusError) ProtoMessage() {}
func (*StatusError) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{11}
return fileDescriptor_ef0691a44d1e275c, []int{2}
}
func (m *StatusError) XXX_Unmarshal(b []byte) error {
@ -513,7 +170,7 @@ func (m *RowResponse) Reset() { *m = RowResponse{} }
func (m *RowResponse) String() string { return proto.CompactTextString(m) }
func (*RowResponse) ProtoMessage() {}
func (*RowResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{12}
return fileDescriptor_ef0691a44d1e275c, []int{3}
}
func (m *RowResponse) XXX_Unmarshal(b []byte) error {
@ -566,7 +223,7 @@ func (m *Row) Reset() { *m = Row{} }
func (m *Row) String() string { return proto.CompactTextString(m) }
func (*Row) ProtoMessage() {}
func (*Row) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{13}
return fileDescriptor_ef0691a44d1e275c, []int{4}
}
func (m *Row) XXX_Unmarshal(b []byte) error {
@ -607,7 +264,7 @@ func (m *TableResponse) Reset() { *m = TableResponse{} }
func (m *TableResponse) String() string { return proto.CompactTextString(m) }
func (*TableResponse) ProtoMessage() {}
func (*TableResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{14}
return fileDescriptor_ef0691a44d1e275c, []int{5}
}
func (m *TableResponse) XXX_Unmarshal(b []byte) error {
@ -661,7 +318,7 @@ func (m *ColumnInfo) Reset() { *m = ColumnInfo{} }
func (m *ColumnInfo) String() string { return proto.CompactTextString(m) }
func (*ColumnInfo) ProtoMessage() {}
func (*ColumnInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{15}
return fileDescriptor_ef0691a44d1e275c, []int{6}
}
func (m *ColumnInfo) XXX_Unmarshal(b []byte) error {
@ -717,7 +374,7 @@ func (m *ColumnResponse) Reset() { *m = ColumnResponse{} }
func (m *ColumnResponse) String() string { return proto.CompactTextString(m) }
func (*ColumnResponse) ProtoMessage() {}
func (*ColumnResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{16}
return fileDescriptor_ef0691a44d1e275c, []int{7}
}
func (m *ColumnResponse) XXX_Unmarshal(b []byte) error {
@ -893,7 +550,7 @@ func (m *Decimal) Reset() { *m = Decimal{} }
func (m *Decimal) String() string { return proto.CompactTextString(m) }
func (*Decimal) ProtoMessage() {}
func (*Decimal) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{17}
return fileDescriptor_ef0691a44d1e275c, []int{8}
}
func (m *Decimal) XXX_Unmarshal(b []byte) error {
@ -944,7 +601,7 @@ func (m *InspectRequest) Reset() { *m = InspectRequest{} }
func (m *InspectRequest) String() string { return proto.CompactTextString(m) }
func (*InspectRequest) ProtoMessage() {}
func (*InspectRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{18}
return fileDescriptor_ef0691a44d1e275c, []int{9}
}
func (m *InspectRequest) XXX_Unmarshal(b []byte) error {
@ -1018,7 +675,7 @@ func (m *Uint64Array) Reset() { *m = Uint64Array{} }
func (m *Uint64Array) String() string { return proto.CompactTextString(m) }
func (*Uint64Array) ProtoMessage() {}
func (*Uint64Array) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{19}
return fileDescriptor_ef0691a44d1e275c, []int{10}
}
func (m *Uint64Array) XXX_Unmarshal(b []byte) error {
@ -1057,7 +714,7 @@ func (m *StringArray) Reset() { *m = StringArray{} }
func (m *StringArray) String() string { return proto.CompactTextString(m) }
func (*StringArray) ProtoMessage() {}
func (*StringArray) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{20}
return fileDescriptor_ef0691a44d1e275c, []int{11}
}
func (m *StringArray) XXX_Unmarshal(b []byte) error {
@ -1099,7 +756,7 @@ func (m *IdsOrKeys) Reset() { *m = IdsOrKeys{} }
func (m *IdsOrKeys) String() string { return proto.CompactTextString(m) }
func (*IdsOrKeys) ProtoMessage() {}
func (*IdsOrKeys) Descriptor() ([]byte, []int) {
return fileDescriptor_ef0691a44d1e275c, []int{21}
return fileDescriptor_ef0691a44d1e275c, []int{12}
}
func (m *IdsOrKeys) XXX_Unmarshal(b []byte) error {
@ -1166,15 +823,6 @@ func (*IdsOrKeys) XXX_OneofWrappers() []interface{} {
}
func init() {
proto.RegisterType((*VDS)(nil), "pilosa.VDS")
proto.RegisterType((*GetVDSsRequest)(nil), "pilosa.GetVDSsRequest")
proto.RegisterType((*GetVDSsResponse)(nil), "pilosa.GetVDSsResponse")
proto.RegisterType((*GetVDSRequest)(nil), "pilosa.GetVDSRequest")
proto.RegisterType((*GetVDSResponse)(nil), "pilosa.GetVDSResponse")
proto.RegisterType((*PostVDSRequest)(nil), "pilosa.PostVDSRequest")
proto.RegisterType((*PostVDSResponse)(nil), "pilosa.PostVDSResponse")
proto.RegisterType((*DeleteVDSRequest)(nil), "pilosa.DeleteVDSRequest")
proto.RegisterType((*DeleteVDSResponse)(nil), "pilosa.DeleteVDSResponse")
proto.RegisterType((*QueryPQLRequest)(nil), "pilosa.QueryPQLRequest")
proto.RegisterType((*QuerySQLRequest)(nil), "pilosa.QuerySQLRequest")
proto.RegisterType((*StatusError)(nil), "pilosa.StatusError")
@ -1193,64 +841,54 @@ func init() {
func init() { proto.RegisterFile("pilosa.proto", fileDescriptor_ef0691a44d1e275c) }
var fileDescriptor_ef0691a44d1e275c = []byte{
// 897 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x72, 0xdb, 0x44,
0x14, 0xb6, 0x90, 0x6a, 0x59, 0xc7, 0x89, 0x93, 0x6c, 0x20, 0xb8, 0x1e, 0xa0, 0x66, 0x3b, 0x53,
0xcc, 0xc0, 0x94, 0x12, 0x28, 0x4c, 0x21, 0x5c, 0x34, 0x75, 0xc1, 0x19, 0x60, 0x70, 0xd7, 0xd4,
0xd7, 0x6c, 0xac, 0x75, 0xd0, 0x54, 0xd1, 0x3a, 0x5a, 0x39, 0xa9, 0x5f, 0x80, 0x37, 0xe0, 0x0d,
0x78, 0x0b, 0xae, 0x78, 0x33, 0x66, 0x7f, 0x25, 0xb9, 0x31, 0x2d, 0xb9, 0xd3, 0x39, 0xdf, 0x77,
0xfe, 0xf6, 0xec, 0x9e, 0x23, 0xd8, 0x5a, 0x24, 0x29, 0x17, 0xf4, 0xfe, 0x22, 0xe7, 0x05, 0x47,
0x4d, 0x2d, 0xe1, 0xdb, 0xe0, 0x4f, 0x87, 0x13, 0x84, 0x20, 0xc8, 0xe8, 0x39, 0xeb, 0x7a, 0x7d,
0x6f, 0x10, 0x11, 0xf5, 0x8d, 0x77, 0xa1, 0xf3, 0x03, 0x2b, 0xa6, 0xc3, 0x89, 0x20, 0xec, 0x62,
0xc9, 0x44, 0x81, 0x0f, 0x61, 0xc7, 0x69, 0xc4, 0x82, 0x67, 0x82, 0xa1, 0x3b, 0x10, 0x5c, 0xc6,
0x42, 0x74, 0xbd, 0xbe, 0x3f, 0x68, 0x1f, 0xb6, 0xef, 0x9b, 0x20, 0xd3, 0xe1, 0x84, 0x28, 0x00,
0xdf, 0x85, 0x6d, 0x6d, 0x63, 0x9c, 0x5c,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x86, 0x72, 0x06,
0x91, 0xab, 0x01, 0x7d, 0x04, 0x7e, 0xe2, 0x86, 0xfe, 0x86, 0xcb, 0x21, 0x19, 0xe8, 0xe3, 0xca,
0x60, 0xdf, 0x78, 0x0f, 0x14, 0xe5, 0xb8, 0x09, 0x81, 0x7c, 0x2c, 0x87, 0xff, 0x04, 0xd0, 0x1c,
0x2b, 0x1a, 0x3a, 0x82, 0xd0, 0xac, 0x31, 0xe4, 0x26, 0x47, 0x7d, 0xd3, 0xf5, 0xde, 0x7d, 0x45,
0x6f, 0xc6, 0x78, 0x03, 0x3d, 0x82, 0xa6, 0x56, 0xa2, 0x77, 0xea, 0x24, 0x6b, 0x7b, 0xb0, 0xae,
0x76, 0xa6, 0x47, 0x10, 0x9a, 0x9d, 0x52, 0x06, 0xae, 0xaf, 0xb1, 0x32, 0xf0, 0xfa, 0xf2, 0x69,
0xa0, 0x63, 0x88, 0xdc, 0x5a, 0x41, 0xdd, 0xf2, 0x7a, 0xd6, 0x37, 0x52, 0xef, 0xf6, 0x35, 0x48,
0x25, 0x83, 0x96, 0x5d, 0x25, 0xc8, 0x85, 0x5a, 0x5b, 0x2e, 0xbd, 0xfd, 0xea, 0x7c, 0x73, 0xb6,
0x0f, 0x3c, 0xf4, 0x18, 0xb6, 0x2d, 0xf7, 0x79, 0x46, 0xf3, 0xd5, 0x66, 0x17, 0xee, 0x68, 0x6a,
0x53, 0xb7, 0x92, 0xc0, 0xf8, 0x95, 0x04, 0xc6, 0xff, 0x23, 0x81, 0xf1, 0xf5, 0x09, 0x8c, 0xdf,
0x20, 0x81, 0x6f, 0x20, 0x34, 0x6f, 0xae, 0xec, 0x41, 0xfd, 0x11, 0x6e, 0x0c, 0x7f, 0xda, 0x54,
0xff, 0x4e, 0x5f, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x1e, 0xff, 0x07, 0x47, 0x4b, 0x09, 0x00,
0x00,
// 745 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08,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00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1265,10 +903,6 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PilosaClient interface {
GetVDSs(ctx context.Context, in *GetVDSsRequest, opts ...grpc.CallOption) (*GetVDSsResponse, error)
GetVDS(ctx context.Context, in *GetVDSRequest, opts ...grpc.CallOption) (*GetVDSResponse, error)
PostVDS(ctx context.Context, in *PostVDSRequest, opts ...grpc.CallOption) (*PostVDSResponse, error)
DeleteVDS(ctx context.Context, in *DeleteVDSRequest, opts ...grpc.CallOption) (*DeleteVDSResponse, error)
QuerySQL(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (Pilosa_QuerySQLClient, error)
QuerySQLUnary(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (*TableResponse, error)
QueryPQL(ctx context.Context, in *QueryPQLRequest, opts ...grpc.CallOption) (Pilosa_QueryPQLClient, error)
@ -1284,42 +918,6 @@ func NewPilosaClient(cc *grpc.ClientConn) PilosaClient {
return &pilosaClient{cc}
}
func (c *pilosaClient) GetVDSs(ctx context.Context, in *GetVDSsRequest, opts ...grpc.CallOption) (*GetVDSsResponse, error) {
out := new(GetVDSsResponse)
err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetVDSs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pilosaClient) GetVDS(ctx context.Context, in *GetVDSRequest, opts ...grpc.CallOption) (*GetVDSResponse, error) {
out := new(GetVDSResponse)
err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetVDS", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pilosaClient) PostVDS(ctx context.Context, in *PostVDSRequest, opts ...grpc.CallOption) (*PostVDSResponse, error) {
out := new(PostVDSResponse)
err := c.cc.Invoke(ctx, "/pilosa.Pilosa/PostVDS", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pilosaClient) DeleteVDS(ctx context.Context, in *DeleteVDSRequest, opts ...grpc.CallOption) (*DeleteVDSResponse, error) {
out := new(DeleteVDSResponse)
err := c.cc.Invoke(ctx, "/pilosa.Pilosa/DeleteVDS", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pilosaClient) QuerySQL(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (Pilosa_QuerySQLClient, error) {
stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[0], "/pilosa.Pilosa/QuerySQL", opts...)
if err != nil {
@ -1436,10 +1034,6 @@ func (x *pilosaInspectClient) Recv() (*RowResponse, error) {
// PilosaServer is the server API for Pilosa service.
type PilosaServer interface {
GetVDSs(context.Context, *GetVDSsRequest) (*GetVDSsResponse, error)
GetVDS(context.Context, *GetVDSRequest) (*GetVDSResponse, error)
PostVDS(context.Context, *PostVDSRequest) (*PostVDSResponse, error)
DeleteVDS(context.Context, *DeleteVDSRequest) (*DeleteVDSResponse, error)
QuerySQL(*QuerySQLRequest, Pilosa_QuerySQLServer) error
QuerySQLUnary(context.Context, *QuerySQLRequest) (*TableResponse, error)
QueryPQL(*QueryPQLRequest, Pilosa_QueryPQLServer) error
@ -1451,18 +1045,6 @@ type PilosaServer interface {
type UnimplementedPilosaServer struct {
}
func (*UnimplementedPilosaServer) GetVDSs(ctx context.Context, req *GetVDSsRequest) (*GetVDSsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVDSs not implemented")
}
func (*UnimplementedPilosaServer) GetVDS(ctx context.Context, req *GetVDSRequest) (*GetVDSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVDS not implemented")
}
func (*UnimplementedPilosaServer) PostVDS(ctx context.Context, req *PostVDSRequest) (*PostVDSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PostVDS not implemented")
}
func (*UnimplementedPilosaServer) DeleteVDS(ctx context.Context, req *DeleteVDSRequest) (*DeleteVDSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteVDS not implemented")
}
func (*UnimplementedPilosaServer) QuerySQL(req *QuerySQLRequest, srv Pilosa_QuerySQLServer) error {
return status.Errorf(codes.Unimplemented, "method QuerySQL not implemented")
}
@ -1483,78 +1065,6 @@ func RegisterPilosaServer(s *grpc.Server, srv PilosaServer) {
s.RegisterService(&_Pilosa_serviceDesc, srv)
}
func _Pilosa_GetVDSs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVDSsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PilosaServer).GetVDSs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pilosa.Pilosa/GetVDSs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PilosaServer).GetVDSs(ctx, req.(*GetVDSsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Pilosa_GetVDS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVDSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PilosaServer).GetVDS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pilosa.Pilosa/GetVDS",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PilosaServer).GetVDS(ctx, req.(*GetVDSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Pilosa_PostVDS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PostVDSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PilosaServer).PostVDS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pilosa.Pilosa/PostVDS",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PilosaServer).PostVDS(ctx, req.(*PostVDSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Pilosa_DeleteVDS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteVDSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PilosaServer).DeleteVDS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pilosa.Pilosa/DeleteVDS",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PilosaServer).DeleteVDS(ctx, req.(*DeleteVDSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Pilosa_QuerySQL_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(QuerySQLRequest)
if err := stream.RecvMsg(m); err != nil {
@ -1658,22 +1168,6 @@ var _Pilosa_serviceDesc = grpc.ServiceDesc{
ServiceName: "pilosa.Pilosa",
HandlerType: (*PilosaServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetVDSs",
Handler: _Pilosa_GetVDSs_Handler,
},
{
MethodName: "GetVDS",
Handler: _Pilosa_GetVDS_Handler,
},
{
MethodName: "PostVDS",
Handler: _Pilosa_PostVDS_Handler,
},
{
MethodName: "DeleteVDS",
Handler: _Pilosa_DeleteVDS_Handler,
},
{
MethodName: "QuerySQLUnary",
Handler: _Pilosa_QuerySQLUnary_Handler,

View file

@ -1,42 +1,9 @@
syntax = "proto3";
package pilosa;
import "public.proto";
//import "public.proto";
message VDS {
string name = 1;
}
message GetVDSsRequest {
}
message GetVDSsResponse {
repeated VDS vdss = 1;
}
message GetVDSRequest {
string name = 1;
}
message GetVDSResponse {
VDS vds = 1;
}
message PostVDSRequest {
string name = 1;
bool keys = 2;
bool trackExistence = 3;
}
message PostVDSResponse {
}
message DeleteVDSRequest {
string name = 1;
}
message DeleteVDSResponse {
}
option go_package = "github.com/pilosa/pilosa/v2/proto";
message QueryPQLRequest {
string index = 1;
@ -117,14 +84,10 @@ message IdsOrKeys {
}
service Pilosa {
rpc GetVDSs(GetVDSsRequest) returns (GetVDSsResponse) {};
rpc GetVDS(GetVDSRequest) returns (GetVDSResponse) {};
rpc PostVDS(PostVDSRequest) returns (PostVDSResponse) {};
rpc DeleteVDS(DeleteVDSRequest) returns (DeleteVDSResponse) {};
rpc QuerySQL(QuerySQLRequest) returns (stream RowResponse) {};
rpc QuerySQLUnary(QuerySQLRequest) returns (TableResponse) {};
rpc QueryPQL(QueryPQLRequest) returns (stream RowResponse) {};
rpc QueryPQLUnary(QueryPQLRequest) returns (TableResponse) {};
rpc Inspect(InspectRequest) returns (stream RowResponse) {};
rpc ImportAtomicRecord(stream AtomicRecord) returns (AtomicImportResponse) {};
//rpc ImportAtomicRecord(stream AtomicRecord) returns (AtomicImportResponse) {};
}

1071
proto/vdsm/vdsm.pb.go Normal file

File diff suppressed because it is too large Load diff

73
proto/vdsm/vdsm.proto Normal file
View file

@ -0,0 +1,73 @@
syntax = "proto3";
package vdsm;
option go_package = "github.com/pilosa/pilosa/v2/proto/vdsm";
import "pilosa.proto";
// deprecated
message DataSource {
int64 id = 1;
string name = 2;
string description = 3;
string type = 4;
map<string, string> config = 5;
string status = 6;
}
message VDS {
string id = 1;
string name = 2;
string description = 3;
string pilosa_index = 4;
repeated DataSource datasources = 5;
}
message GetVDSsRequest {
}
message GetVDSsResponse {
repeated VDS vdss = 1;
}
message GetVDSRequest {
oneof idOrName {
string id = 1;
string name = 2;
}
}
message GetVDSResponse {
VDS vds = 1;
}
message PostVDSRequest {
string definition = 1;
}
message PostVDSResponse {
string id = 1;
string uri = 2;
}
message DeleteVDSRequest {
oneof idOrName {
string id = 1;
string name = 2;
}
}
message DeleteVDSResponse {
}
service Molecula {
rpc GetVDSs(GetVDSsRequest) returns (GetVDSsResponse) {};
rpc GetVDS(GetVDSRequest) returns (GetVDSResponse) {};
rpc PostVDS(PostVDSRequest) returns (PostVDSResponse) {};
rpc DeleteVDS(DeleteVDSRequest) returns (DeleteVDSResponse) {};
rpc QuerySQL(pilosa.QuerySQLRequest) returns (stream pilosa.RowResponse) {};
rpc QuerySQLUnary(pilosa.QuerySQLRequest) returns (pilosa.TableResponse) {};
rpc QueryPQL(pilosa.QueryPQLRequest) returns (stream pilosa.RowResponse) {};
rpc QueryPQLUnary(pilosa.QueryPQLRequest) returns (pilosa.TableResponse) {};
rpc Inspect(pilosa.InspectRequest) returns (stream pilosa.RowResponse) {};
}

View file

@ -26,6 +26,7 @@ import (
"github.com/pilosa/pilosa/v2"
"github.com/pilosa/pilosa/v2/logger"
pb "github.com/pilosa/pilosa/v2/proto"
vdsm_pb "github.com/pilosa/pilosa/v2/proto/vdsm"
"github.com/pilosa/pilosa/v2/stats"
"github.com/pkg/errors"
"google.golang.org/grpc"
@ -125,48 +126,6 @@ func errToStatusError(err error) error {
return status.Error(codes.Unknown, err.Error())
}
// GetVDSs returns a single VDS given a name
func (h *GRPCHandler) GetVDS(ctx context.Context, req *pb.GetVDSRequest) (*pb.GetVDSResponse, error) {
// TODO: Return all schema information associated with the VDS.
// It's obviously not very useful to return the same data as given.
schema := h.api.Schema(ctx)
for _, index := range schema {
if req.Name == index.Name {
return &pb.GetVDSResponse{Vds: &pb.VDS{Name: index.Name}}, nil
}
}
return nil, status.Error(codes.NotFound, fmt.Sprintf("VDS with name %s not found", req.Name))
}
// GetVDSs returns a list of all VDSs
func (h *GRPCHandler) GetVDSs(ctx context.Context, req *pb.GetVDSsRequest) (*pb.GetVDSsResponse, error) {
schema := h.api.Schema(ctx)
vdss := make([]*pb.VDS, len(schema))
for i, index := range schema {
vdss[i] = &pb.VDS{Name: index.Name}
}
return &pb.GetVDSsResponse{Vdss: vdss}, nil
}
// PostVDS creates a new VDS
func (h *GRPCHandler) PostVDS(ctx context.Context, req *pb.PostVDSRequest) (*pb.PostVDSResponse, error) {
opts := pilosa.IndexOptions{Keys: req.Keys, TrackExistence: req.TrackExistence}
_, err := h.api.CreateIndex(ctx, req.Name, opts)
if err != nil {
return nil, errToStatusError(err)
}
return &pb.PostVDSResponse{}, nil
}
// DeleteVDS deletes a VDS
func (h *GRPCHandler) DeleteVDS(ctx context.Context, req *pb.DeleteVDSRequest) (*pb.DeleteVDSResponse, error) {
err := h.api.DeleteIndex(ctx, req.Name)
if err != nil {
return nil, errToStatusError(err)
}
return &pb.DeleteVDSResponse{}, nil
}
func (h *GRPCHandler) execSQL(ctx context.Context, queryStr string) (pb.ToRowser, error) {
h.stats.Count(pilosa.MetricSqlQueries, 1, 1)
return execSQL(ctx, h.api, h.logger, queryStr)
@ -292,6 +251,100 @@ func (h *GRPCHandler) QueryPQLUnary(ctx context.Context, req *pb.QueryPQLRequest
return table, errToStatusError(nil)
}
// VDSMGRPCHandler contains methods which handle the various gRPC requests, ported from VDSM.
type VDSMGRPCHandler struct {
grpcHandler *GRPCHandler
api *pilosa.API
logger logger.Logger
stats stats.StatsClient
}
func NewVDSMGRPCHandler(grpcHandler *GRPCHandler, api *pilosa.API) *VDSMGRPCHandler {
return &VDSMGRPCHandler{grpcHandler: grpcHandler, api: api, logger: logger.NopLogger, stats: stats.NopStatsClient}
}
func (h *VDSMGRPCHandler) WithLogger(logger logger.Logger) *VDSMGRPCHandler {
h.logger = logger
return h
}
func (h *VDSMGRPCHandler) WithStats(stats stats.StatsClient) *VDSMGRPCHandler {
h.stats = stats
return h
}
// GetVDSs returns a single VDS given a name
func (h *VDSMGRPCHandler) GetVDS(ctx context.Context, req *vdsm_pb.GetVDSRequest) (*vdsm_pb.GetVDSResponse, error) {
typedIdOrName := req.GetIdOrName()
switch idOrName := typedIdOrName.(type) {
case *vdsm_pb.GetVDSRequest_Id:
return nil, status.Error(codes.InvalidArgument, "VDS IDs are no longer supported")
case *vdsm_pb.GetVDSRequest_Name:
schema := h.api.Schema(ctx)
for _, index := range schema {
if idOrName.Name == index.Name {
return &vdsm_pb.GetVDSResponse{Vds: &vdsm_pb.VDS{Name: index.Name}}, nil
}
}
return nil, status.Error(codes.NotFound, fmt.Sprintf("VDS with name %s not found", idOrName.Name))
default:
return nil, status.Error(codes.NotFound, "VDS not found")
}
}
// GetVDSs returns a list of all VDSs
func (h *VDSMGRPCHandler) GetVDSs(ctx context.Context, req *vdsm_pb.GetVDSsRequest) (*vdsm_pb.GetVDSsResponse, error) {
schema := h.api.Schema(ctx)
vdss := make([]*vdsm_pb.VDS, len(schema))
for i, index := range schema {
vdss[i] = &vdsm_pb.VDS{Name: index.Name}
}
return &vdsm_pb.GetVDSsResponse{Vdss: vdss}, nil
}
// PostVDS creates a new VDS
func (*VDSMGRPCHandler) PostVDS(ctx context.Context, req *vdsm_pb.PostVDSRequest) (*vdsm_pb.PostVDSResponse, error) {
// Pilosa doesn't implement VDSD files, so this is unimplemented
return nil, status.Errorf(codes.Unimplemented, "method PostVDS not implemented")
}
// DeleteVDS deletes a VDS
func (h *VDSMGRPCHandler) DeleteVDS(ctx context.Context, req *vdsm_pb.DeleteVDSRequest) (*vdsm_pb.DeleteVDSResponse, error) {
typedIdOrName := req.GetIdOrName()
switch idOrName := typedIdOrName.(type) {
case *vdsm_pb.DeleteVDSRequest_Id:
return nil, status.Error(codes.InvalidArgument, "VDS IDs are no longer supported")
case *vdsm_pb.DeleteVDSRequest_Name:
err := h.api.DeleteIndex(ctx, idOrName.Name)
if err != nil {
return nil, errToStatusError(err)
}
return &vdsm_pb.DeleteVDSResponse{}, nil
default:
return nil, status.Error(codes.NotFound, "")
}
}
func (h *VDSMGRPCHandler) QuerySQL(req *pb.QuerySQLRequest, srv vdsm_pb.Molecula_QuerySQLServer) error {
return h.grpcHandler.QuerySQL(req, srv)
}
func (h *VDSMGRPCHandler) QuerySQLUnary(ctx context.Context, req *pb.QuerySQLRequest) (*pb.TableResponse, error) {
return h.grpcHandler.QuerySQLUnary(ctx, req)
}
func (h *VDSMGRPCHandler) QueryPQL(req *pb.QueryPQLRequest, srv vdsm_pb.Molecula_QueryPQLServer) error {
return h.grpcHandler.QueryPQL(req, srv)
}
func (h *VDSMGRPCHandler) QueryPQLUnary(ctx context.Context, req *pb.QueryPQLRequest) (*pb.TableResponse, error) {
return h.grpcHandler.QueryPQLUnary(ctx, req)
}
func (h *VDSMGRPCHandler) Inspect(req *pb.InspectRequest, srv vdsm_pb.Molecula_InspectServer) error {
return h.grpcHandler.Inspect(req, srv)
}
// ResultUint64 is a wrapper around a uint64 result type
// so that we can implement the ToTabler and ToRowser
// interfaces.
@ -1144,7 +1197,9 @@ func (s *grpcServer) Serve(tlsConfig *tls.Config) error {
// create grpc server
s.mu.Lock()
s.grpcServer = grpc.NewServer(opts...)
pb.RegisterPilosaServer(s.grpcServer, NewGRPCHandler(s.api).WithLogger(s.logger).WithStats(s.stats))
grpcHandler := NewGRPCHandler(s.api).WithLogger(s.logger).WithStats(s.stats)
pb.RegisterPilosaServer(s.grpcServer, grpcHandler)
vdsm_pb.RegisterMoleculaServer(s.grpcServer, NewVDSMGRPCHandler(grpcHandler, s.api).WithLogger(s.logger).WithStats(s.stats))
// register the server so its services are available to grpc_cli and others
reflection.Register(s.grpcServer)