File: collectd.pb.go

package info (click to toggle)
golang-collectd 0.3.0%2Bgit20181025.f80706d-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 312 kB
  • sloc: makefile: 3
file content (306 lines) | stat: -rw-r--r-- 10,454 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
// Code generated by protoc-gen-go.
// source: collectd.proto
// DO NOT EDIT!

/*
Package proto is a generated protocol buffer package.

It is generated from these files:
	collectd.proto

It has these top-level messages:
	PutValuesRequest
	PutValuesResponse
	QueryValuesRequest
	QueryValuesResponse
*/
package proto

import proto1 "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import collectd_types "collectd.org/rpc/proto/types"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.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 _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package

// The arguments to PutValues.
type PutValuesRequest struct {
	// value_list is the metric to be sent to the server.
	ValueList *collectd_types.ValueList `protobuf:"bytes,1,opt,name=value_list,json=valueList" json:"value_list,omitempty"`
}

func (m *PutValuesRequest) Reset()                    { *m = PutValuesRequest{} }
func (m *PutValuesRequest) String() string            { return proto1.CompactTextString(m) }
func (*PutValuesRequest) ProtoMessage()               {}
func (*PutValuesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *PutValuesRequest) GetValueList() *collectd_types.ValueList {
	if m != nil {
		return m.ValueList
	}
	return nil
}

// The response from PutValues.
type PutValuesResponse struct {
}

func (m *PutValuesResponse) Reset()                    { *m = PutValuesResponse{} }
func (m *PutValuesResponse) String() string            { return proto1.CompactTextString(m) }
func (*PutValuesResponse) ProtoMessage()               {}
func (*PutValuesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

// The arguments to QueryValues.
type QueryValuesRequest struct {
	// Query by the fields of the identifier. Only return values matching the
	// specified shell wildcard patterns (see fnmatch(3)). Use '*' to match
	// any value.
	Identifier *collectd_types.Identifier `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"`
}

func (m *QueryValuesRequest) Reset()                    { *m = QueryValuesRequest{} }
func (m *QueryValuesRequest) String() string            { return proto1.CompactTextString(m) }
func (*QueryValuesRequest) ProtoMessage()               {}
func (*QueryValuesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *QueryValuesRequest) GetIdentifier() *collectd_types.Identifier {
	if m != nil {
		return m.Identifier
	}
	return nil
}

// The response from QueryValues.
type QueryValuesResponse struct {
	ValueList *collectd_types.ValueList `protobuf:"bytes,1,opt,name=value_list,json=valueList" json:"value_list,omitempty"`
}

func (m *QueryValuesResponse) Reset()                    { *m = QueryValuesResponse{} }
func (m *QueryValuesResponse) String() string            { return proto1.CompactTextString(m) }
func (*QueryValuesResponse) ProtoMessage()               {}
func (*QueryValuesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *QueryValuesResponse) GetValueList() *collectd_types.ValueList {
	if m != nil {
		return m.ValueList
	}
	return nil
}

func init() {
	proto1.RegisterType((*PutValuesRequest)(nil), "collectd.PutValuesRequest")
	proto1.RegisterType((*PutValuesResponse)(nil), "collectd.PutValuesResponse")
	proto1.RegisterType((*QueryValuesRequest)(nil), "collectd.QueryValuesRequest")
	proto1.RegisterType((*QueryValuesResponse)(nil), "collectd.QueryValuesResponse")
}

// 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

// Client API for Collectd service

type CollectdClient interface {
	// PutValues reads the value lists from the PutValuesRequest stream.
	// The gRPC server embedded into collectd will inject them into the system
	// just like the network plugin.
	PutValues(ctx context.Context, opts ...grpc.CallOption) (Collectd_PutValuesClient, error)
	// QueryValues returns a stream of matching value lists from collectd's
	// internal cache.
	QueryValues(ctx context.Context, in *QueryValuesRequest, opts ...grpc.CallOption) (Collectd_QueryValuesClient, error)
}

type collectdClient struct {
	cc *grpc.ClientConn
}

func NewCollectdClient(cc *grpc.ClientConn) CollectdClient {
	return &collectdClient{cc}
}

func (c *collectdClient) PutValues(ctx context.Context, opts ...grpc.CallOption) (Collectd_PutValuesClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Collectd_serviceDesc.Streams[0], c.cc, "/collectd.Collectd/PutValues", opts...)
	if err != nil {
		return nil, err
	}
	x := &collectdPutValuesClient{stream}
	return x, nil
}

type Collectd_PutValuesClient interface {
	Send(*PutValuesRequest) error
	CloseAndRecv() (*PutValuesResponse, error)
	grpc.ClientStream
}

type collectdPutValuesClient struct {
	grpc.ClientStream
}

func (x *collectdPutValuesClient) Send(m *PutValuesRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *collectdPutValuesClient) CloseAndRecv() (*PutValuesResponse, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(PutValuesResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *collectdClient) QueryValues(ctx context.Context, in *QueryValuesRequest, opts ...grpc.CallOption) (Collectd_QueryValuesClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Collectd_serviceDesc.Streams[1], c.cc, "/collectd.Collectd/QueryValues", opts...)
	if err != nil {
		return nil, err
	}
	x := &collectdQueryValuesClient{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 Collectd_QueryValuesClient interface {
	Recv() (*QueryValuesResponse, error)
	grpc.ClientStream
}

type collectdQueryValuesClient struct {
	grpc.ClientStream
}

func (x *collectdQueryValuesClient) Recv() (*QueryValuesResponse, error) {
	m := new(QueryValuesResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for Collectd service

type CollectdServer interface {
	// PutValues reads the value lists from the PutValuesRequest stream.
	// The gRPC server embedded into collectd will inject them into the system
	// just like the network plugin.
	PutValues(Collectd_PutValuesServer) error
	// QueryValues returns a stream of matching value lists from collectd's
	// internal cache.
	QueryValues(*QueryValuesRequest, Collectd_QueryValuesServer) error
}

func RegisterCollectdServer(s *grpc.Server, srv CollectdServer) {
	s.RegisterService(&_Collectd_serviceDesc, srv)
}

func _Collectd_PutValues_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CollectdServer).PutValues(&collectdPutValuesServer{stream})
}

type Collectd_PutValuesServer interface {
	SendAndClose(*PutValuesResponse) error
	Recv() (*PutValuesRequest, error)
	grpc.ServerStream
}

type collectdPutValuesServer struct {
	grpc.ServerStream
}

func (x *collectdPutValuesServer) SendAndClose(m *PutValuesResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *collectdPutValuesServer) Recv() (*PutValuesRequest, error) {
	m := new(PutValuesRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _Collectd_QueryValues_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryValuesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CollectdServer).QueryValues(m, &collectdQueryValuesServer{stream})
}

type Collectd_QueryValuesServer interface {
	Send(*QueryValuesResponse) error
	grpc.ServerStream
}

type collectdQueryValuesServer struct {
	grpc.ServerStream
}

func (x *collectdQueryValuesServer) Send(m *QueryValuesResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _Collectd_serviceDesc = grpc.ServiceDesc{
	ServiceName: "collectd.Collectd",
	HandlerType: (*CollectdServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "PutValues",
			Handler:       _Collectd_PutValues_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "QueryValues",
			Handler:       _Collectd_QueryValues_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "collectd.proto",
}

func init() { proto1.RegisterFile("collectd.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 238 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xce, 0xcf, 0xc9,
	0x49, 0x4d, 0x2e, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0xb8,
	0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x21, 0xc2, 0x4a, 0x3e, 0x5c, 0x02, 0x01, 0xa5, 0x25, 0x61, 0x89,
	0x39, 0xa5, 0xa9, 0xc5, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x16, 0x5c, 0x5c, 0x65,
	0x20, 0x81, 0xf8, 0x9c, 0xcc, 0xe2, 0x12, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d,
	0xb8, 0x79, 0x10, 0xed, 0x60, 0x2d, 0x3e, 0x99, 0xc5, 0x25, 0x41, 0x9c, 0x65, 0x30, 0xa6, 0x92,
	0x30, 0x97, 0x20, 0x92, 0x69, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x4a, 0x01, 0x5c, 0x42, 0x81,
	0xa5, 0xa9, 0x45, 0x95, 0xa8, 0x96, 0x58, 0x71, 0x71, 0x65, 0xa6, 0xa4, 0xe6, 0x95, 0x64, 0xa6,
	0x65, 0xa6, 0x16, 0x41, 0x2d, 0x91, 0x42, 0xb7, 0xc4, 0x13, 0xae, 0x22, 0x08, 0x49, 0xb5, 0x92,
	0x3f, 0x97, 0x30, 0x8a, 0x89, 0x10, 0x8b, 0xc8, 0x77, 0xb7, 0xd1, 0x02, 0x46, 0x2e, 0x0e, 0x67,
	0xa8, 0x3a, 0x21, 0x37, 0x2e, 0x4e, 0xb8, 0x27, 0x84, 0x90, 0x9c, 0x84, 0x1e, 0x4e, 0x52, 0xd2,
	0x58, 0xe5, 0x20, 0x8e, 0xd1, 0x60, 0x14, 0xf2, 0xe1, 0xe2, 0x46, 0x72, 0xa5, 0x90, 0x0c, 0x42,
	0x35, 0x66, 0x70, 0x48, 0xc9, 0xe2, 0x90, 0x85, 0x98, 0x66, 0xc0, 0xe8, 0x24, 0x11, 0x25, 0x06,
	0x57, 0x91, 0x5f, 0x94, 0xae, 0x5f, 0x54, 0x90, 0xac, 0x0f, 0x8e, 0xc2, 0x24, 0x36, 0x30, 0x65,
	0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xde, 0xc9, 0x28, 0x16, 0xf2, 0x01, 0x00, 0x00,
}