1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: opencensus/proto/agent/metrics/v1/metrics_service.proto
3
4package v1
5
6import (
7	context "context"
8	fmt "fmt"
9	v1 "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1"
10	v11 "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
11	v12 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
12	proto "github.com/golang/protobuf/proto"
13	grpc "google.golang.org/grpc"
14	codes "google.golang.org/grpc/codes"
15	status "google.golang.org/grpc/status"
16	math "math"
17)
18
19// Reference imports to suppress errors if they are not otherwise used.
20var _ = proto.Marshal
21var _ = fmt.Errorf
22var _ = math.Inf
23
24// This is a compile-time assertion to ensure that this generated file
25// is compatible with the proto package it is being compiled against.
26// A compilation error at this line likely means your copy of the
27// proto package needs to be updated.
28const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
29
30type ExportMetricsServiceRequest struct {
31	// This is required only in the first message on the stream or if the
32	// previous sent ExportMetricsServiceRequest message has a different Node (e.g.
33	// when the same RPC is used to send Metrics from multiple Applications).
34	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
35	// A list of metrics that belong to the last received Node.
36	Metrics []*v11.Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
37	// The resource for the metrics in this message that do not have an explicit
38	// resource set.
39	// If unset, the most recently set resource in the RPC stream applies. It is
40	// valid to never be set within a stream, e.g. when no resource info is known
41	// at all or when all sent metrics have an explicit resource set.
42	Resource             *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
43	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
44	XXX_unrecognized     []byte        `json:"-"`
45	XXX_sizecache        int32         `json:"-"`
46}
47
48func (m *ExportMetricsServiceRequest) Reset()         { *m = ExportMetricsServiceRequest{} }
49func (m *ExportMetricsServiceRequest) String() string { return proto.CompactTextString(m) }
50func (*ExportMetricsServiceRequest) ProtoMessage()    {}
51func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int) {
52	return fileDescriptor_47e253a956287d04, []int{0}
53}
54
55func (m *ExportMetricsServiceRequest) XXX_Unmarshal(b []byte) error {
56	return xxx_messageInfo_ExportMetricsServiceRequest.Unmarshal(m, b)
57}
58func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
59	return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic)
60}
61func (m *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) {
62	xxx_messageInfo_ExportMetricsServiceRequest.Merge(m, src)
63}
64func (m *ExportMetricsServiceRequest) XXX_Size() int {
65	return xxx_messageInfo_ExportMetricsServiceRequest.Size(m)
66}
67func (m *ExportMetricsServiceRequest) XXX_DiscardUnknown() {
68	xxx_messageInfo_ExportMetricsServiceRequest.DiscardUnknown(m)
69}
70
71var xxx_messageInfo_ExportMetricsServiceRequest proto.InternalMessageInfo
72
73func (m *ExportMetricsServiceRequest) GetNode() *v1.Node {
74	if m != nil {
75		return m.Node
76	}
77	return nil
78}
79
80func (m *ExportMetricsServiceRequest) GetMetrics() []*v11.Metric {
81	if m != nil {
82		return m.Metrics
83	}
84	return nil
85}
86
87func (m *ExportMetricsServiceRequest) GetResource() *v12.Resource {
88	if m != nil {
89		return m.Resource
90	}
91	return nil
92}
93
94type ExportMetricsServiceResponse struct {
95	XXX_NoUnkeyedLiteral struct{} `json:"-"`
96	XXX_unrecognized     []byte   `json:"-"`
97	XXX_sizecache        int32    `json:"-"`
98}
99
100func (m *ExportMetricsServiceResponse) Reset()         { *m = ExportMetricsServiceResponse{} }
101func (m *ExportMetricsServiceResponse) String() string { return proto.CompactTextString(m) }
102func (*ExportMetricsServiceResponse) ProtoMessage()    {}
103func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int) {
104	return fileDescriptor_47e253a956287d04, []int{1}
105}
106
107func (m *ExportMetricsServiceResponse) XXX_Unmarshal(b []byte) error {
108	return xxx_messageInfo_ExportMetricsServiceResponse.Unmarshal(m, b)
109}
110func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
111	return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic)
112}
113func (m *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) {
114	xxx_messageInfo_ExportMetricsServiceResponse.Merge(m, src)
115}
116func (m *ExportMetricsServiceResponse) XXX_Size() int {
117	return xxx_messageInfo_ExportMetricsServiceResponse.Size(m)
118}
119func (m *ExportMetricsServiceResponse) XXX_DiscardUnknown() {
120	xxx_messageInfo_ExportMetricsServiceResponse.DiscardUnknown(m)
121}
122
123var xxx_messageInfo_ExportMetricsServiceResponse proto.InternalMessageInfo
124
125func init() {
126	proto.RegisterType((*ExportMetricsServiceRequest)(nil), "opencensus.proto.agent.metrics.v1.ExportMetricsServiceRequest")
127	proto.RegisterType((*ExportMetricsServiceResponse)(nil), "opencensus.proto.agent.metrics.v1.ExportMetricsServiceResponse")
128}
129
130func init() {
131	proto.RegisterFile("opencensus/proto/agent/metrics/v1/metrics_service.proto", fileDescriptor_47e253a956287d04)
132}
133
134var fileDescriptor_47e253a956287d04 = []byte{
135	// 361 bytes of a gzipped FileDescriptorProto
136	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x4a, 0xc3, 0x40,
137	0x14, 0x86, 0x9d, 0x56, 0xaa, 0x4c, 0xc1, 0x45, 0xdc, 0x94, 0x2a, 0xd2, 0x56, 0x91, 0x8a, 0x64,
138	0x62, 0xea, 0x42, 0x10, 0x54, 0xac, 0xb8, 0x11, 0xd4, 0x12, 0xc1, 0x85, 0x1b, 0x69, 0xd3, 0x47,
139	0xcc, 0x22, 0x33, 0x71, 0x66, 0x12, 0xbc, 0x85, 0x77, 0x70, 0xef, 0x8d, 0x3c, 0x81, 0xa7, 0x90,
140	0xe4, 0x4d, 0x5a, 0x4a, 0x8c, 0x05, 0x77, 0x8f, 0xe4, 0xff, 0xfe, 0xf7, 0xff, 0x33, 0x43, 0x4f,
141	0x44, 0x0c, 0xdc, 0x07, 0xae, 0x12, 0xe5, 0xc4, 0x52, 0x68, 0xe1, 0x8c, 0x03, 0xe0, 0xda, 0x89,
142	0x40, 0xcb, 0xd0, 0x57, 0x4e, 0xea, 0x16, 0xe3, 0xb3, 0x02, 0x99, 0x86, 0x3e, 0xb0, 0x5c, 0x66,
143	0x75, 0xe7, 0x20, 0x7e, 0x61, 0x39, 0xc8, 0x8c, 0x9a, 0xa5, 0x6e, 0xdb, 0xae, 0xf0, 0xf6, 0x45,
144	0x14, 0x09, 0x9e, 0x59, 0xe3, 0x84, 0x7c, 0xfb, 0xa0, 0x24, 0x2f, 0x87, 0x30, 0xd2, 0xc3, 0x92,
145	0x54, 0x82, 0x12, 0x89, 0xf4, 0x21, 0xd3, 0x16, 0x33, 0x8a, 0x7b, 0x5f, 0x84, 0x6e, 0x5d, 0xbf,
146	0xc5, 0x42, 0xea, 0x5b, 0x34, 0x79, 0xc0, 0x22, 0x1e, 0xbc, 0x26, 0xa0, 0xb4, 0x75, 0x4a, 0x57,
147	0xb9, 0x98, 0x42, 0x8b, 0x74, 0x48, 0xbf, 0x39, 0xd8, 0x67, 0x15, 0xc5, 0x4c, 0xd6, 0xd4, 0x65,
148	0x77, 0x62, 0x0a, 0x5e, 0xce, 0x58, 0x67, 0x74, 0xcd, 0x24, 0x6b, 0xd5, 0x3a, 0xf5, 0x7e, 0x73,
149	0xb0, 0x5b, 0xc6, 0xe7, 0x27, 0xc2, 0x30, 0x80, 0x57, 0x30, 0xd6, 0x90, 0xae, 0x17, 0x61, 0x5b,
150	0xf5, 0xaa, 0xf5, 0xb3, 0x3a, 0xa9, 0xcb, 0x3c, 0x33, 0x7b, 0x33, 0xae, 0xb7, 0x43, 0xb7, 0x7f,
151	0x6f, 0xa7, 0x62, 0xc1, 0x15, 0x0c, 0x3e, 0x08, 0xdd, 0x58, 0xfc, 0x65, 0xbd, 0x13, 0xda, 0x40,
152	0xc6, 0x3a, 0x67, 0x4b, 0xef, 0x91, 0xfd, 0x71, 0x78, 0xed, 0x8b, 0x7f, 0xf3, 0x18, 0xaf, 0xb7,
153	0xd2, 0x27, 0x47, 0x64, 0xf8, 0x49, 0xe8, 0x5e, 0x28, 0x96, 0x7b, 0x0d, 0x37, 0x17, 0x6d, 0x46,
154	0x99, 0x6a, 0x44, 0x9e, 0x6e, 0x82, 0x50, 0xbf, 0x24, 0x93, 0xec, 0x92, 0x1c, 0x34, 0xb0, 0x43,
155	0xae, 0xb4, 0x4c, 0x22, 0xe0, 0x7a, 0xac, 0x43, 0xc1, 0x9d, 0xb9, 0xb7, 0x8d, 0x4f, 0x26, 0x00,
156	0x6e, 0x07, 0xe5, 0xf7, 0xfe, 0x5d, 0xeb, 0xde, 0xc7, 0xc0, 0xaf, 0x30, 0x46, 0xbe, 0x80, 0x5d,
157	0xe6, 0x31, 0xcc, 0x6a, 0xf6, 0xe8, 0x4e, 0x1a, 0xb9, 0xc5, 0xf1, 0x4f, 0x00, 0x00, 0x00, 0xff,
158	0xff, 0x19, 0x28, 0xa4, 0x50, 0x3f, 0x03, 0x00, 0x00,
159}
160
161// Reference imports to suppress errors if they are not otherwise used.
162var _ context.Context
163var _ grpc.ClientConn
164
165// This is a compile-time assertion to ensure that this generated file
166// is compatible with the grpc package it is being compiled against.
167const _ = grpc.SupportPackageIsVersion4
168
169// MetricsServiceClient is the client API for MetricsService service.
170//
171// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
172type MetricsServiceClient interface {
173	// For performance reasons, it is recommended to keep this RPC
174	// alive for the entire life of the application.
175	Export(ctx context.Context, opts ...grpc.CallOption) (MetricsService_ExportClient, error)
176}
177
178type metricsServiceClient struct {
179	cc *grpc.ClientConn
180}
181
182func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient {
183	return &metricsServiceClient{cc}
184}
185
186func (c *metricsServiceClient) Export(ctx context.Context, opts ...grpc.CallOption) (MetricsService_ExportClient, error) {
187	stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/opencensus.proto.agent.metrics.v1.MetricsService/Export", opts...)
188	if err != nil {
189		return nil, err
190	}
191	x := &metricsServiceExportClient{stream}
192	return x, nil
193}
194
195type MetricsService_ExportClient interface {
196	Send(*ExportMetricsServiceRequest) error
197	Recv() (*ExportMetricsServiceResponse, error)
198	grpc.ClientStream
199}
200
201type metricsServiceExportClient struct {
202	grpc.ClientStream
203}
204
205func (x *metricsServiceExportClient) Send(m *ExportMetricsServiceRequest) error {
206	return x.ClientStream.SendMsg(m)
207}
208
209func (x *metricsServiceExportClient) Recv() (*ExportMetricsServiceResponse, error) {
210	m := new(ExportMetricsServiceResponse)
211	if err := x.ClientStream.RecvMsg(m); err != nil {
212		return nil, err
213	}
214	return m, nil
215}
216
217// MetricsServiceServer is the server API for MetricsService service.
218type MetricsServiceServer interface {
219	// For performance reasons, it is recommended to keep this RPC
220	// alive for the entire life of the application.
221	Export(MetricsService_ExportServer) error
222}
223
224// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations.
225type UnimplementedMetricsServiceServer struct {
226}
227
228func (*UnimplementedMetricsServiceServer) Export(srv MetricsService_ExportServer) error {
229	return status.Errorf(codes.Unimplemented, "method Export not implemented")
230}
231
232func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) {
233	s.RegisterService(&_MetricsService_serviceDesc, srv)
234}
235
236func _MetricsService_Export_Handler(srv interface{}, stream grpc.ServerStream) error {
237	return srv.(MetricsServiceServer).Export(&metricsServiceExportServer{stream})
238}
239
240type MetricsService_ExportServer interface {
241	Send(*ExportMetricsServiceResponse) error
242	Recv() (*ExportMetricsServiceRequest, error)
243	grpc.ServerStream
244}
245
246type metricsServiceExportServer struct {
247	grpc.ServerStream
248}
249
250func (x *metricsServiceExportServer) Send(m *ExportMetricsServiceResponse) error {
251	return x.ServerStream.SendMsg(m)
252}
253
254func (x *metricsServiceExportServer) Recv() (*ExportMetricsServiceRequest, error) {
255	m := new(ExportMetricsServiceRequest)
256	if err := x.ServerStream.RecvMsg(m); err != nil {
257		return nil, err
258	}
259	return m, nil
260}
261
262var _MetricsService_serviceDesc = grpc.ServiceDesc{
263	ServiceName: "opencensus.proto.agent.metrics.v1.MetricsService",
264	HandlerType: (*MetricsServiceServer)(nil),
265	Methods:     []grpc.MethodDesc{},
266	Streams: []grpc.StreamDesc{
267		{
268			StreamName:    "Export",
269			Handler:       _MetricsService_Export_Handler,
270			ServerStreams: true,
271			ClientStreams: true,
272		},
273	},
274	Metadata: "opencensus/proto/agent/metrics/v1/metrics_service.proto",
275}
276