2022-03-28 21:17:50 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2022-03-22 12:40:24 +00:00
|
|
|
// source: agent/grpc/private/internal/testservice/simple.proto
|
2020-08-28 23:23:40 +00:00
|
|
|
|
|
|
|
package testservice
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
math "math"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 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.
|
2021-08-12 18:05:46 +00:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2020-08-28 23:23:40 +00:00
|
|
|
|
|
|
|
type Req struct {
|
|
|
|
Datacenter string `protobuf:"bytes,1,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Req) Reset() { *m = Req{} }
|
|
|
|
func (m *Req) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Req) ProtoMessage() {}
|
|
|
|
func (*Req) Descriptor() ([]byte, []int) {
|
2022-03-22 12:40:24 +00:00
|
|
|
return fileDescriptor_98af0751f806f450, []int{0}
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
2022-03-28 21:17:50 +00:00
|
|
|
|
2020-08-28 23:23:40 +00:00
|
|
|
func (m *Req) XXX_Unmarshal(b []byte) error {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Req.Unmarshal(m, b)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Req.Marshal(b, m, deterministic)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Req) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Req.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Req) XXX_Size() int {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Req.Size(m)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Req) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Req.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Req proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Req) GetDatacenter() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Datacenter
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type Resp struct {
|
|
|
|
ServerName string `protobuf:"bytes,1,opt,name=ServerName,proto3" json:"ServerName,omitempty"`
|
2020-09-11 22:52:47 +00:00
|
|
|
Datacenter string `protobuf:"bytes,2,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
|
2020-08-28 23:23:40 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Resp) Reset() { *m = Resp{} }
|
|
|
|
func (m *Resp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Resp) ProtoMessage() {}
|
|
|
|
func (*Resp) Descriptor() ([]byte, []int) {
|
2022-03-22 12:40:24 +00:00
|
|
|
return fileDescriptor_98af0751f806f450, []int{1}
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
2022-03-28 21:17:50 +00:00
|
|
|
|
2020-08-28 23:23:40 +00:00
|
|
|
func (m *Resp) XXX_Unmarshal(b []byte) error {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Resp.Unmarshal(m, b)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Resp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Resp.Marshal(b, m, deterministic)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Resp) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Resp.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Resp) XXX_Size() int {
|
2022-03-28 21:17:50 +00:00
|
|
|
return xxx_messageInfo_Resp.Size(m)
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
func (m *Resp) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Resp.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Resp proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Resp) GetServerName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ServerName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-09-11 22:52:47 +00:00
|
|
|
func (m *Resp) GetDatacenter() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Datacenter
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-08-28 23:23:40 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Req)(nil), "testservice.Req")
|
|
|
|
proto.RegisterType((*Resp)(nil), "testservice.Resp")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2022-03-22 12:40:24 +00:00
|
|
|
proto.RegisterFile("agent/grpc/private/internal/testservice/simple.proto", fileDescriptor_98af0751f806f450)
|
|
|
|
}
|
|
|
|
|
|
|
|
var fileDescriptor_98af0751f806f450 = []byte{
|
2022-03-28 21:17:50 +00:00
|
|
|
// 189 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0xcd, 0x0a, 0x82, 0x40,
|
|
|
|
0x14, 0x85, 0xb3, 0x44, 0xf0, 0xb6, 0xa9, 0x59, 0x45, 0x8b, 0x08, 0x21, 0x68, 0xe5, 0x84, 0xf5,
|
|
|
|
0x08, 0xe1, 0xb2, 0xc5, 0xf8, 0x04, 0x93, 0x5c, 0x6c, 0xc0, 0xf9, 0x71, 0xe6, 0x62, 0xaf, 0x1f,
|
|
|
|
0x0a, 0x91, 0xb8, 0x6a, 0xfb, 0xdd, 0xef, 0x1e, 0xce, 0x81, 0x9b, 0x6c, 0xd0, 0x10, 0x6f, 0xbc,
|
|
|
|
0xab, 0xb9, 0xf3, 0xaa, 0x97, 0x84, 0x5c, 0x19, 0x42, 0x6f, 0x64, 0xcb, 0x09, 0x03, 0x05, 0xf4,
|
|
|
|
0xbd, 0xaa, 0x91, 0x07, 0xa5, 0x5d, 0x8b, 0xb9, 0xf3, 0x96, 0x2c, 0x5b, 0x4f, 0x2e, 0xd9, 0x09,
|
|
|
|
0x56, 0x02, 0x3b, 0x76, 0x00, 0xb8, 0x4b, 0x92, 0x35, 0x0e, 0xdf, 0xbb, 0xe8, 0x18, 0x9d, 0x53,
|
|
|
|
0x31, 0x21, 0x59, 0x09, 0xb1, 0xc0, 0xe0, 0x06, 0xaf, 0x42, 0xdf, 0xa3, 0x7f, 0x48, 0x8d, 0x5f,
|
|
|
|
0xef, 0x47, 0x66, 0x39, 0xcb, 0x79, 0x4e, 0xa1, 0x21, 0xa9, 0xc6, 0x2e, 0xac, 0x80, 0xb4, 0xb2,
|
|
|
|
0x1a, 0xe9, 0xa5, 0x4c, 0xc3, 0x36, 0xf9, 0xa4, 0x53, 0x2e, 0xb0, 0xdb, 0x6f, 0x67, 0x24, 0xb8,
|
|
|
|
0x6c, 0xc1, 0x38, 0xc4, 0x65, 0x6b, 0xdf, 0x7f, 0xea, 0x97, 0xe8, 0x99, 0x8c, 0x8b, 0xaf, 0x9f,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x5c, 0xf5, 0xcb, 0x29, 0x01, 0x00, 0x00,
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
2022-03-28 21:17:50 +00:00
|
|
|
var _ grpc.ClientConnInterface
|
2020-08-28 23:23:40 +00:00
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
2022-03-28 21:17:50 +00:00
|
|
|
const _ = grpc.SupportPackageIsVersion6
|
2020-08-28 23:23:40 +00:00
|
|
|
|
|
|
|
// SimpleClient is the client API for Simple service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type SimpleClient interface {
|
|
|
|
Something(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
|
|
|
|
Flow(ctx context.Context, in *Req, opts ...grpc.CallOption) (Simple_FlowClient, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type simpleClient struct {
|
2022-03-28 21:17:50 +00:00
|
|
|
cc grpc.ClientConnInterface
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|
|
|
|
|
2022-03-28 21:17:50 +00:00
|
|
|
func NewSimpleClient(cc grpc.ClientConnInterface) SimpleClient {
|
2020-08-28 23:23:40 +00:00
|
|
|
return &simpleClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *simpleClient) Something(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error) {
|
|
|
|
out := new(Resp)
|
|
|
|
err := c.cc.Invoke(ctx, "/testservice.Simple/Something", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *simpleClient) Flow(ctx context.Context, in *Req, opts ...grpc.CallOption) (Simple_FlowClient, error) {
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Simple_serviceDesc.Streams[0], "/testservice.Simple/Flow", opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &simpleFlowClient{stream}
|
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return x, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Simple_FlowClient interface {
|
|
|
|
Recv() (*Resp, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type simpleFlowClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *simpleFlowClient) Recv() (*Resp, error) {
|
|
|
|
m := new(Resp)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// SimpleServer is the server API for Simple service.
|
|
|
|
type SimpleServer interface {
|
|
|
|
Something(context.Context, *Req) (*Resp, error)
|
|
|
|
Flow(*Req, Simple_FlowServer) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnimplementedSimpleServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedSimpleServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedSimpleServer) Something(ctx context.Context, req *Req) (*Resp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Something not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedSimpleServer) Flow(req *Req, srv Simple_FlowServer) error {
|
|
|
|
return status.Errorf(codes.Unimplemented, "method Flow not implemented")
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterSimpleServer(s *grpc.Server, srv SimpleServer) {
|
|
|
|
s.RegisterService(&_Simple_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Simple_Something_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Req)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SimpleServer).Something(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/testservice.Simple/Something",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SimpleServer).Something(ctx, req.(*Req))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Simple_Flow_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
m := new(Req)
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return srv.(SimpleServer).Flow(m, &simpleFlowServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type Simple_FlowServer interface {
|
|
|
|
Send(*Resp) error
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type simpleFlowServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *simpleFlowServer) Send(m *Resp) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Simple_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "testservice.Simple",
|
|
|
|
HandlerType: (*SimpleServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Something",
|
|
|
|
Handler: _Simple_Something_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
{
|
|
|
|
StreamName: "Flow",
|
|
|
|
Handler: _Simple_Flow_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
|
|
|
},
|
2022-03-22 12:40:24 +00:00
|
|
|
Metadata: "agent/grpc/private/internal/testservice/simple.proto",
|
2020-08-28 23:23:40 +00:00
|
|
|
}
|