93788e5218
* create upsert query for check-in method * add tests * fix lint err * add benchmark test for db query * fix lint and tests * add a unit test, fix lint * add address to tests * replace print w/ b.Fatal * refactor query per CR comments * fix disqualified, only set if null * fix query * add version to updatecheckin query * fix version * fix tests * change version for tests * add version to tests * add IP, add transport, mv unit test * use node.address as arg * add last ip * fix lint
500 lines
16 KiB
Go
500 lines
16 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: contact.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
grpc "google.golang.org/grpc"
|
|
math "math"
|
|
drpc "storj.io/drpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type CheckInRequest struct {
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
|
Version *NodeVersion `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
|
Capacity *NodeCapacity `protobuf:"bytes,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
|
|
Operator *NodeOperator `protobuf:"bytes,4,opt,name=operator,proto3" json:"operator,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CheckInRequest) Reset() { *m = CheckInRequest{} }
|
|
func (m *CheckInRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CheckInRequest) ProtoMessage() {}
|
|
func (*CheckInRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a5036fff2565fb15, []int{0}
|
|
}
|
|
func (m *CheckInRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CheckInRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *CheckInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CheckInRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CheckInRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CheckInRequest.Merge(m, src)
|
|
}
|
|
func (m *CheckInRequest) XXX_Size() int {
|
|
return xxx_messageInfo_CheckInRequest.Size(m)
|
|
}
|
|
func (m *CheckInRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CheckInRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CheckInRequest proto.InternalMessageInfo
|
|
|
|
func (m *CheckInRequest) GetAddress() string {
|
|
if m != nil {
|
|
return m.Address
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CheckInRequest) GetVersion() *NodeVersion {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CheckInRequest) GetCapacity() *NodeCapacity {
|
|
if m != nil {
|
|
return m.Capacity
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CheckInRequest) GetOperator() *NodeOperator {
|
|
if m != nil {
|
|
return m.Operator
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CheckInResponse struct {
|
|
PingNodeSuccess bool `protobuf:"varint,1,opt,name=ping_node_success,json=pingNodeSuccess,proto3" json:"ping_node_success,omitempty"`
|
|
PingErrorMessage string `protobuf:"bytes,2,opt,name=ping_error_message,json=pingErrorMessage,proto3" json:"ping_error_message,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CheckInResponse) Reset() { *m = CheckInResponse{} }
|
|
func (m *CheckInResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*CheckInResponse) ProtoMessage() {}
|
|
func (*CheckInResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a5036fff2565fb15, []int{1}
|
|
}
|
|
func (m *CheckInResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CheckInResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *CheckInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CheckInResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CheckInResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CheckInResponse.Merge(m, src)
|
|
}
|
|
func (m *CheckInResponse) XXX_Size() int {
|
|
return xxx_messageInfo_CheckInResponse.Size(m)
|
|
}
|
|
func (m *CheckInResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CheckInResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CheckInResponse proto.InternalMessageInfo
|
|
|
|
func (m *CheckInResponse) GetPingNodeSuccess() bool {
|
|
if m != nil {
|
|
return m.PingNodeSuccess
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *CheckInResponse) GetPingErrorMessage() string {
|
|
if m != nil {
|
|
return m.PingErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ContactPingRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ContactPingRequest) Reset() { *m = ContactPingRequest{} }
|
|
func (m *ContactPingRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ContactPingRequest) ProtoMessage() {}
|
|
func (*ContactPingRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a5036fff2565fb15, []int{2}
|
|
}
|
|
func (m *ContactPingRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ContactPingRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ContactPingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ContactPingRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ContactPingRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ContactPingRequest.Merge(m, src)
|
|
}
|
|
func (m *ContactPingRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ContactPingRequest.Size(m)
|
|
}
|
|
func (m *ContactPingRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ContactPingRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ContactPingRequest proto.InternalMessageInfo
|
|
|
|
type ContactPingResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ContactPingResponse) Reset() { *m = ContactPingResponse{} }
|
|
func (m *ContactPingResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ContactPingResponse) ProtoMessage() {}
|
|
func (*ContactPingResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a5036fff2565fb15, []int{3}
|
|
}
|
|
func (m *ContactPingResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ContactPingResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ContactPingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ContactPingResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ContactPingResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ContactPingResponse.Merge(m, src)
|
|
}
|
|
func (m *ContactPingResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ContactPingResponse.Size(m)
|
|
}
|
|
func (m *ContactPingResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ContactPingResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ContactPingResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*CheckInRequest)(nil), "contact.CheckInRequest")
|
|
proto.RegisterType((*CheckInResponse)(nil), "contact.CheckInResponse")
|
|
proto.RegisterType((*ContactPingRequest)(nil), "contact.ContactPingRequest")
|
|
proto.RegisterType((*ContactPingResponse)(nil), "contact.ContactPingResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("contact.proto", fileDescriptor_a5036fff2565fb15) }
|
|
|
|
var fileDescriptor_a5036fff2565fb15 = []byte{
|
|
// 308 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4d, 0x4f, 0xf2, 0x40,
|
|
0x14, 0x85, 0x53, 0x5e, 0xf2, 0x16, 0xae, 0x51, 0xe4, 0xaa, 0xb1, 0x41, 0x17, 0xa4, 0x2b, 0xa2,
|
|
0xa6, 0x0b, 0xdc, 0xba, 0x12, 0x59, 0xb8, 0x50, 0xc9, 0x98, 0xb8, 0x70, 0x43, 0xca, 0xf4, 0x06,
|
|
0x1b, 0xe2, 0x4c, 0x9d, 0x19, 0x4c, 0xfc, 0x65, 0xfe, 0x3d, 0x33, 0x1f, 0x2d, 0x41, 0x5c, 0xce,
|
|
0x39, 0xcf, 0x3d, 0x73, 0x3f, 0x60, 0x9f, 0x4b, 0x61, 0x72, 0x6e, 0xb2, 0x4a, 0x49, 0x23, 0x31,
|
|
0x0e, 0xcf, 0x01, 0x08, 0x59, 0x90, 0x17, 0xd3, 0xef, 0x08, 0x0e, 0x26, 0x6f, 0xc4, 0x57, 0xf7,
|
|
0x82, 0xd1, 0xc7, 0x9a, 0xb4, 0xc1, 0x04, 0xe2, 0xbc, 0x28, 0x14, 0x69, 0x9d, 0x44, 0xc3, 0x68,
|
|
0xd4, 0x65, 0xf5, 0x13, 0x2f, 0x21, 0xfe, 0x24, 0xa5, 0x4b, 0x29, 0x92, 0xd6, 0x30, 0x1a, 0xed,
|
|
0x8d, 0xfb, 0x99, 0x8b, 0x7a, 0x94, 0x05, 0xbd, 0x78, 0x83, 0xd5, 0x04, 0x66, 0xd0, 0xe1, 0x79,
|
|
0x95, 0xf3, 0xd2, 0x7c, 0x25, 0xff, 0x1c, 0x8d, 0x1b, 0x7a, 0x12, 0x1c, 0xd6, 0x30, 0x96, 0x97,
|
|
0x15, 0xa9, 0xdc, 0x48, 0x95, 0xb4, 0x7f, 0xf3, 0x4f, 0xc1, 0x61, 0x0d, 0x93, 0xae, 0xa0, 0xd7,
|
|
0x34, 0xae, 0x2b, 0x29, 0x34, 0xe1, 0x05, 0xf4, 0xab, 0x52, 0x2c, 0xe7, 0xb6, 0x6c, 0xae, 0xd7,
|
|
0x9c, 0xd7, 0x33, 0x74, 0x58, 0xcf, 0x1a, 0x36, 0xe9, 0xd9, 0xcb, 0x78, 0x05, 0xe8, 0x58, 0x52,
|
|
0x4a, 0xaa, 0xf9, 0x3b, 0x69, 0x9d, 0x2f, 0xc9, 0x8d, 0xd5, 0x65, 0x87, 0xd6, 0x99, 0x5a, 0xe3,
|
|
0xc1, 0xeb, 0xe9, 0x31, 0xe0, 0xc4, 0x6f, 0x6f, 0x56, 0x8a, 0x65, 0xd8, 0x54, 0x7a, 0x02, 0x47,
|
|
0x5b, 0xaa, 0x6f, 0x63, 0x3c, 0x83, 0x38, 0xc8, 0x38, 0x85, 0xce, 0x2c, 0x7c, 0x8c, 0x67, 0x59,
|
|
0x7d, 0x8f, 0xdd, 0xa8, 0xc1, 0xf9, 0xdf, 0x66, 0x48, 0xbc, 0x83, 0xb6, 0x8b, 0xb8, 0x81, 0x38,
|
|
0xcc, 0x8c, 0xa7, 0x9b, 0x82, 0xad, 0xf3, 0x0d, 0x92, 0x5d, 0xc3, 0xa7, 0xdc, 0xb6, 0x5f, 0x5b,
|
|
0xd5, 0x62, 0xf1, 0xdf, 0x1d, 0xfe, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xa1, 0x19, 0xad,
|
|
0x1e, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
type DRPCContactClient interface {
|
|
DRPCConn() drpc.Conn
|
|
|
|
PingNode(ctx context.Context, in *ContactPingRequest) (*ContactPingResponse, error)
|
|
}
|
|
|
|
type drpcContactClient struct {
|
|
cc drpc.Conn
|
|
}
|
|
|
|
func NewDRPCContactClient(cc drpc.Conn) DRPCContactClient {
|
|
return &drpcContactClient{cc}
|
|
}
|
|
|
|
func (c *drpcContactClient) DRPCConn() drpc.Conn { return c.cc }
|
|
|
|
func (c *drpcContactClient) PingNode(ctx context.Context, in *ContactPingRequest) (*ContactPingResponse, error) {
|
|
out := new(ContactPingResponse)
|
|
err := c.cc.Invoke(ctx, "/contact.Contact/PingNode", in, out)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
type DRPCContactServer interface {
|
|
PingNode(context.Context, *ContactPingRequest) (*ContactPingResponse, error)
|
|
}
|
|
|
|
type DRPCContactDescription struct{}
|
|
|
|
func (DRPCContactDescription) NumMethods() int { return 1 }
|
|
|
|
func (DRPCContactDescription) Method(n int) (string, drpc.Handler, interface{}, bool) {
|
|
switch n {
|
|
case 0:
|
|
return "/contact.Contact/PingNode",
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
return srv.(DRPCContactServer).
|
|
PingNode(
|
|
ctx,
|
|
in1.(*ContactPingRequest),
|
|
)
|
|
}, DRPCContactServer.PingNode, true
|
|
default:
|
|
return "", nil, nil, false
|
|
}
|
|
}
|
|
|
|
func DRPCRegisterContact(srv drpc.Server, impl DRPCContactServer) {
|
|
srv.Register(impl, DRPCContactDescription{})
|
|
}
|
|
|
|
type DRPCContact_PingNodeStream interface {
|
|
drpc.Stream
|
|
SendAndClose(*ContactPingResponse) error
|
|
}
|
|
|
|
type drpcContactPingNodeStream struct {
|
|
drpc.Stream
|
|
}
|
|
|
|
func (x *drpcContactPingNodeStream) SendAndClose(m *ContactPingResponse) error {
|
|
if err := x.MsgSend(m); err != nil {
|
|
return err
|
|
}
|
|
return x.CloseSend()
|
|
}
|
|
|
|
type DRPCNodeClient interface {
|
|
DRPCConn() drpc.Conn
|
|
|
|
CheckIn(ctx context.Context, in *CheckInRequest) (*CheckInResponse, error)
|
|
}
|
|
|
|
type drpcNodeClient struct {
|
|
cc drpc.Conn
|
|
}
|
|
|
|
func NewDRPCNodeClient(cc drpc.Conn) DRPCNodeClient {
|
|
return &drpcNodeClient{cc}
|
|
}
|
|
|
|
func (c *drpcNodeClient) DRPCConn() drpc.Conn { return c.cc }
|
|
|
|
func (c *drpcNodeClient) CheckIn(ctx context.Context, in *CheckInRequest) (*CheckInResponse, error) {
|
|
out := new(CheckInResponse)
|
|
err := c.cc.Invoke(ctx, "/contact.Node/CheckIn", in, out)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
type DRPCNodeServer interface {
|
|
CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
|
|
}
|
|
|
|
type DRPCNodeDescription struct{}
|
|
|
|
func (DRPCNodeDescription) NumMethods() int { return 1 }
|
|
|
|
func (DRPCNodeDescription) Method(n int) (string, drpc.Handler, interface{}, bool) {
|
|
switch n {
|
|
case 0:
|
|
return "/contact.Node/CheckIn",
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
return srv.(DRPCNodeServer).
|
|
CheckIn(
|
|
ctx,
|
|
in1.(*CheckInRequest),
|
|
)
|
|
}, DRPCNodeServer.CheckIn, true
|
|
default:
|
|
return "", nil, nil, false
|
|
}
|
|
}
|
|
|
|
func DRPCRegisterNode(srv drpc.Server, impl DRPCNodeServer) {
|
|
srv.Register(impl, DRPCNodeDescription{})
|
|
}
|
|
|
|
type DRPCNode_CheckInStream interface {
|
|
drpc.Stream
|
|
SendAndClose(*CheckInResponse) error
|
|
}
|
|
|
|
type drpcNodeCheckInStream struct {
|
|
drpc.Stream
|
|
}
|
|
|
|
func (x *drpcNodeCheckInStream) SendAndClose(m *CheckInResponse) error {
|
|
if err := x.MsgSend(m); err != nil {
|
|
return err
|
|
}
|
|
return x.CloseSend()
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// ContactClient is the client API for Contact service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type ContactClient interface {
|
|
PingNode(ctx context.Context, in *ContactPingRequest, opts ...grpc.CallOption) (*ContactPingResponse, error)
|
|
}
|
|
|
|
type contactClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewContactClient(cc *grpc.ClientConn) ContactClient {
|
|
return &contactClient{cc}
|
|
}
|
|
|
|
func (c *contactClient) PingNode(ctx context.Context, in *ContactPingRequest, opts ...grpc.CallOption) (*ContactPingResponse, error) {
|
|
out := new(ContactPingResponse)
|
|
err := c.cc.Invoke(ctx, "/contact.Contact/PingNode", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ContactServer is the server API for Contact service.
|
|
type ContactServer interface {
|
|
PingNode(context.Context, *ContactPingRequest) (*ContactPingResponse, error)
|
|
}
|
|
|
|
func RegisterContactServer(s *grpc.Server, srv ContactServer) {
|
|
s.RegisterService(&_Contact_serviceDesc, srv)
|
|
}
|
|
|
|
func _Contact_PingNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ContactPingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ContactServer).PingNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/contact.Contact/PingNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ContactServer).PingNode(ctx, req.(*ContactPingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Contact_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "contact.Contact",
|
|
HandlerType: (*ContactServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "PingNode",
|
|
Handler: _Contact_PingNode_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "contact.proto",
|
|
}
|
|
|
|
// NodeClient is the client API for Node service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type NodeClient interface {
|
|
CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error)
|
|
}
|
|
|
|
type nodeClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewNodeClient(cc *grpc.ClientConn) NodeClient {
|
|
return &nodeClient{cc}
|
|
}
|
|
|
|
func (c *nodeClient) CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error) {
|
|
out := new(CheckInResponse)
|
|
err := c.cc.Invoke(ctx, "/contact.Node/CheckIn", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// NodeServer is the server API for Node service.
|
|
type NodeServer interface {
|
|
CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
|
|
}
|
|
|
|
func RegisterNodeServer(s *grpc.Server, srv NodeServer) {
|
|
s.RegisterService(&_Node_serviceDesc, srv)
|
|
}
|
|
|
|
func _Node_CheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckInRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NodeServer).CheckIn(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/contact.Node/CheckIn",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServer).CheckIn(ctx, req.(*CheckInRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Node_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "contact.Node",
|
|
HandlerType: (*NodeServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CheckIn",
|
|
Handler: _Node_CheckIn_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "contact.proto",
|
|
}
|