aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/go-plugin/internal/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/go-plugin/internal/plugin')
-rw-r--r--vendor/github.com/hashicorp/go-plugin/internal/plugin/gen.go3
-rw-r--r--vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.pb.go203
-rw-r--r--vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.proto15
-rw-r--r--vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.pb.go143
-rw-r--r--vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.proto11
5 files changed, 375 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/plugin/gen.go b/vendor/github.com/hashicorp/go-plugin/internal/plugin/gen.go
new file mode 100644
index 0000000..aa2fdc8
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/internal/plugin/gen.go
@@ -0,0 +1,3 @@
1//go:generate protoc -I ./ ./grpc_broker.proto ./grpc_controller.proto --go_out=plugins=grpc:.
2
3package plugin
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.pb.go b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.pb.go
new file mode 100644
index 0000000..b6850aa
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.pb.go
@@ -0,0 +1,203 @@
1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: grpc_broker.proto
3
4package plugin
5
6import (
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
9 context "golang.org/x/net/context"
10 grpc "google.golang.org/grpc"
11 math "math"
12)
13
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
23const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
24
25type ConnInfo struct {
26 ServiceId uint32 `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
27 Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
28 Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
29 XXX_NoUnkeyedLiteral struct{} `json:"-"`
30 XXX_unrecognized []byte `json:"-"`
31 XXX_sizecache int32 `json:"-"`
32}
33
34func (m *ConnInfo) Reset() { *m = ConnInfo{} }
35func (m *ConnInfo) String() string { return proto.CompactTextString(m) }
36func (*ConnInfo) ProtoMessage() {}
37func (*ConnInfo) Descriptor() ([]byte, []int) {
38 return fileDescriptor_802e9beed3ec3b28, []int{0}
39}
40
41func (m *ConnInfo) XXX_Unmarshal(b []byte) error {
42 return xxx_messageInfo_ConnInfo.Unmarshal(m, b)
43}
44func (m *ConnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
45 return xxx_messageInfo_ConnInfo.Marshal(b, m, deterministic)
46}
47func (m *ConnInfo) XXX_Merge(src proto.Message) {
48 xxx_messageInfo_ConnInfo.Merge(m, src)
49}
50func (m *ConnInfo) XXX_Size() int {
51 return xxx_messageInfo_ConnInfo.Size(m)
52}
53func (m *ConnInfo) XXX_DiscardUnknown() {
54 xxx_messageInfo_ConnInfo.DiscardUnknown(m)
55}
56
57var xxx_messageInfo_ConnInfo proto.InternalMessageInfo
58
59func (m *ConnInfo) GetServiceId() uint32 {
60 if m != nil {
61 return m.ServiceId
62 }
63 return 0
64}
65
66func (m *ConnInfo) GetNetwork() string {
67 if m != nil {
68 return m.Network
69 }
70 return ""
71}
72
73func (m *ConnInfo) GetAddress() string {
74 if m != nil {
75 return m.Address
76 }
77 return ""
78}
79
80func init() {
81 proto.RegisterType((*ConnInfo)(nil), "plugin.ConnInfo")
82}
83
84func init() { proto.RegisterFile("grpc_broker.proto", fileDescriptor_802e9beed3ec3b28) }
85
86var fileDescriptor_802e9beed3ec3b28 = []byte{
87 // 175 bytes of a gzipped FileDescriptorProto
88 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x2f, 0x2a, 0x48,
89 0x8e, 0x4f, 0x2a, 0xca, 0xcf, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2b,
90 0xc8, 0x29, 0x4d, 0xcf, 0xcc, 0x53, 0x8a, 0xe5, 0xe2, 0x70, 0xce, 0xcf, 0xcb, 0xf3, 0xcc, 0x4b,
91 0xcb, 0x17, 0x92, 0xe5, 0xe2, 0x2a, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x8d, 0xcf, 0x4c, 0x91,
92 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0xe2, 0x84, 0x8a, 0x78, 0xa6, 0x08, 0x49, 0x70, 0xb1, 0xe7,
93 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x4b, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xb8, 0x20,
94 0x99, 0xc4, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0x62, 0x09, 0x66, 0x88, 0x0c, 0x94, 0x6b, 0xe4, 0xcc,
95 0xc5, 0xe5, 0x1e, 0x14, 0xe0, 0xec, 0x04, 0xb6, 0x5a, 0xc8, 0x94, 0x8b, 0x3b, 0xb8, 0x24, 0xb1,
96 0xa8, 0x24, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x57, 0x48, 0x40, 0x0f, 0xe2, 0x08, 0x3d, 0x98, 0x0b,
97 0xa4, 0x30, 0x44, 0x34, 0x18, 0x0d, 0x18, 0x9d, 0x38, 0xa2, 0xa0, 0xae, 0x4d, 0x62, 0x03, 0x3b,
98 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x10, 0x15, 0x39, 0x47, 0xd1, 0x00, 0x00, 0x00,
99}
100
101// Reference imports to suppress errors if they are not otherwise used.
102var _ context.Context
103var _ grpc.ClientConn
104
105// This is a compile-time assertion to ensure that this generated file
106// is compatible with the grpc package it is being compiled against.
107const _ = grpc.SupportPackageIsVersion4
108
109// GRPCBrokerClient is the client API for GRPCBroker service.
110//
111// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
112type GRPCBrokerClient interface {
113 StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error)
114}
115
116type gRPCBrokerClient struct {
117 cc *grpc.ClientConn
118}
119
120func NewGRPCBrokerClient(cc *grpc.ClientConn) GRPCBrokerClient {
121 return &gRPCBrokerClient{cc}
122}
123
124func (c *gRPCBrokerClient) StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error) {
125 stream, err := c.cc.NewStream(ctx, &_GRPCBroker_serviceDesc.Streams[0], "/plugin.GRPCBroker/StartStream", opts...)
126 if err != nil {
127 return nil, err
128 }
129 x := &gRPCBrokerStartStreamClient{stream}
130 return x, nil
131}
132
133type GRPCBroker_StartStreamClient interface {
134 Send(*ConnInfo) error
135 Recv() (*ConnInfo, error)
136 grpc.ClientStream
137}
138
139type gRPCBrokerStartStreamClient struct {
140 grpc.ClientStream
141}
142
143func (x *gRPCBrokerStartStreamClient) Send(m *ConnInfo) error {
144 return x.ClientStream.SendMsg(m)
145}
146
147func (x *gRPCBrokerStartStreamClient) Recv() (*ConnInfo, error) {
148 m := new(ConnInfo)
149 if err := x.ClientStream.RecvMsg(m); err != nil {
150 return nil, err
151 }
152 return m, nil
153}
154
155// GRPCBrokerServer is the server API for GRPCBroker service.
156type GRPCBrokerServer interface {
157 StartStream(GRPCBroker_StartStreamServer) error
158}
159
160func RegisterGRPCBrokerServer(s *grpc.Server, srv GRPCBrokerServer) {
161 s.RegisterService(&_GRPCBroker_serviceDesc, srv)
162}
163
164func _GRPCBroker_StartStream_Handler(srv interface{}, stream grpc.ServerStream) error {
165 return srv.(GRPCBrokerServer).StartStream(&gRPCBrokerStartStreamServer{stream})
166}
167
168type GRPCBroker_StartStreamServer interface {
169 Send(*ConnInfo) error
170 Recv() (*ConnInfo, error)
171 grpc.ServerStream
172}
173
174type gRPCBrokerStartStreamServer struct {
175 grpc.ServerStream
176}
177
178func (x *gRPCBrokerStartStreamServer) Send(m *ConnInfo) error {
179 return x.ServerStream.SendMsg(m)
180}
181
182func (x *gRPCBrokerStartStreamServer) Recv() (*ConnInfo, error) {
183 m := new(ConnInfo)
184 if err := x.ServerStream.RecvMsg(m); err != nil {
185 return nil, err
186 }
187 return m, nil
188}
189
190var _GRPCBroker_serviceDesc = grpc.ServiceDesc{
191 ServiceName: "plugin.GRPCBroker",
192 HandlerType: (*GRPCBrokerServer)(nil),
193 Methods: []grpc.MethodDesc{},
194 Streams: []grpc.StreamDesc{
195 {
196 StreamName: "StartStream",
197 Handler: _GRPCBroker_StartStream_Handler,
198 ServerStreams: true,
199 ClientStreams: true,
200 },
201 },
202 Metadata: "grpc_broker.proto",
203}
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.proto b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.proto
new file mode 100644
index 0000000..3fa79e8
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.proto
@@ -0,0 +1,15 @@
1syntax = "proto3";
2package plugin;
3option go_package = "plugin";
4
5message ConnInfo {
6 uint32 service_id = 1;
7 string network = 2;
8 string address = 3;
9}
10
11service GRPCBroker {
12 rpc StartStream(stream ConnInfo) returns (stream ConnInfo);
13}
14
15
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.pb.go b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.pb.go
new file mode 100644
index 0000000..38b4204
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.pb.go
@@ -0,0 +1,143 @@
1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: grpc_controller.proto
3
4package plugin
5
6import (
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
9 context "golang.org/x/net/context"
10 grpc "google.golang.org/grpc"
11 math "math"
12)
13
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
23const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
24
25type Empty struct {
26 XXX_NoUnkeyedLiteral struct{} `json:"-"`
27 XXX_unrecognized []byte `json:"-"`
28 XXX_sizecache int32 `json:"-"`
29}
30
31func (m *Empty) Reset() { *m = Empty{} }
32func (m *Empty) String() string { return proto.CompactTextString(m) }
33func (*Empty) ProtoMessage() {}
34func (*Empty) Descriptor() ([]byte, []int) {
35 return fileDescriptor_23c2c7e42feab570, []int{0}
36}
37
38func (m *Empty) XXX_Unmarshal(b []byte) error {
39 return xxx_messageInfo_Empty.Unmarshal(m, b)
40}
41func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
42 return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
43}
44func (m *Empty) XXX_Merge(src proto.Message) {
45 xxx_messageInfo_Empty.Merge(m, src)
46}
47func (m *Empty) XXX_Size() int {
48 return xxx_messageInfo_Empty.Size(m)
49}
50func (m *Empty) XXX_DiscardUnknown() {
51 xxx_messageInfo_Empty.DiscardUnknown(m)
52}
53
54var xxx_messageInfo_Empty proto.InternalMessageInfo
55
56func init() {
57 proto.RegisterType((*Empty)(nil), "plugin.Empty")
58}
59
60func init() { proto.RegisterFile("grpc_controller.proto", fileDescriptor_23c2c7e42feab570) }
61
62var fileDescriptor_23c2c7e42feab570 = []byte{
63 // 108 bytes of a gzipped FileDescriptorProto
64 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0x2f, 0x2a, 0x48,
65 0x8e, 0x4f, 0xce, 0xcf, 0x2b, 0x29, 0xca, 0xcf, 0xc9, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f,
66 0xc9, 0x17, 0x62, 0x2b, 0xc8, 0x29, 0x4d, 0xcf, 0xcc, 0x53, 0x62, 0xe7, 0x62, 0x75, 0xcd, 0x2d,
67 0x28, 0xa9, 0x34, 0xb2, 0xe2, 0xe2, 0x73, 0x0f, 0x0a, 0x70, 0x76, 0x86, 0x2b, 0x14, 0xd2, 0xe0,
68 0xe2, 0x08, 0xce, 0x28, 0x2d, 0x49, 0xc9, 0x2f, 0xcf, 0x13, 0xe2, 0xd5, 0x83, 0xa8, 0xd7, 0x03,
69 0x2b, 0x96, 0x42, 0xe5, 0x3a, 0x71, 0x44, 0x41, 0x8d, 0x4b, 0x62, 0x03, 0x9b, 0x6e, 0x0c, 0x08,
70 0x00, 0x00, 0xff, 0xff, 0xab, 0x7c, 0x27, 0xe5, 0x76, 0x00, 0x00, 0x00,
71}
72
73// Reference imports to suppress errors if they are not otherwise used.
74var _ context.Context
75var _ grpc.ClientConn
76
77// This is a compile-time assertion to ensure that this generated file
78// is compatible with the grpc package it is being compiled against.
79const _ = grpc.SupportPackageIsVersion4
80
81// GRPCControllerClient is the client API for GRPCController service.
82//
83// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
84type GRPCControllerClient interface {
85 Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
86}
87
88type gRPCControllerClient struct {
89 cc *grpc.ClientConn
90}
91
92func NewGRPCControllerClient(cc *grpc.ClientConn) GRPCControllerClient {
93 return &gRPCControllerClient{cc}
94}
95
96func (c *gRPCControllerClient) Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
97 out := new(Empty)
98 err := c.cc.Invoke(ctx, "/plugin.GRPCController/Shutdown", in, out, opts...)
99 if err != nil {
100 return nil, err
101 }
102 return out, nil
103}
104
105// GRPCControllerServer is the server API for GRPCController service.
106type GRPCControllerServer interface {
107 Shutdown(context.Context, *Empty) (*Empty, error)
108}
109
110func RegisterGRPCControllerServer(s *grpc.Server, srv GRPCControllerServer) {
111 s.RegisterService(&_GRPCController_serviceDesc, srv)
112}
113
114func _GRPCController_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
115 in := new(Empty)
116 if err := dec(in); err != nil {
117 return nil, err
118 }
119 if interceptor == nil {
120 return srv.(GRPCControllerServer).Shutdown(ctx, in)
121 }
122 info := &grpc.UnaryServerInfo{
123 Server: srv,
124 FullMethod: "/plugin.GRPCController/Shutdown",
125 }
126 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
127 return srv.(GRPCControllerServer).Shutdown(ctx, req.(*Empty))
128 }
129 return interceptor(ctx, in, info, handler)
130}
131
132var _GRPCController_serviceDesc = grpc.ServiceDesc{
133 ServiceName: "plugin.GRPCController",
134 HandlerType: (*GRPCControllerServer)(nil),
135 Methods: []grpc.MethodDesc{
136 {
137 MethodName: "Shutdown",
138 Handler: _GRPCController_Shutdown_Handler,
139 },
140 },
141 Streams: []grpc.StreamDesc{},
142 Metadata: "grpc_controller.proto",
143}
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.proto b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.proto
new file mode 100644
index 0000000..345d0a1
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.proto
@@ -0,0 +1,11 @@
1syntax = "proto3";
2package plugin;
3option go_package = "plugin";
4
5message Empty {
6}
7
8// The GRPCController is responsible for telling the plugin server to shutdown.
9service GRPCController {
10 rpc Shutdown(Empty) returns (Empty);
11}