Sergiusz Bazanski | e5a956a | 2019-11-17 22:38:40 +0100 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: opencensus/proto/agent/trace/v1/trace_service.proto |
| 3 | |
| 4 | package v1 |
| 5 | |
| 6 | import ( |
| 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | v1 "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1" |
| 10 | v12 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1" |
| 11 | v11 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/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. |
| 20 | var _ = proto.Marshal |
| 21 | var _ = fmt.Errorf |
| 22 | var _ = 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. |
| 28 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| 29 | |
| 30 | type CurrentLibraryConfig struct { |
| 31 | // This is required only in the first message on the stream or if the |
| 32 | // previous sent CurrentLibraryConfig message has a different Node (e.g. |
| 33 | // when the same RPC is used to configure multiple Applications). |
| 34 | Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` |
| 35 | // Current configuration. |
| 36 | Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` |
| 37 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 38 | XXX_unrecognized []byte `json:"-"` |
| 39 | XXX_sizecache int32 `json:"-"` |
| 40 | } |
| 41 | |
| 42 | func (m *CurrentLibraryConfig) Reset() { *m = CurrentLibraryConfig{} } |
| 43 | func (m *CurrentLibraryConfig) String() string { return proto.CompactTextString(m) } |
| 44 | func (*CurrentLibraryConfig) ProtoMessage() {} |
| 45 | func (*CurrentLibraryConfig) Descriptor() ([]byte, []int) { |
| 46 | return fileDescriptor_7027f99caf7ac6a5, []int{0} |
| 47 | } |
| 48 | |
| 49 | func (m *CurrentLibraryConfig) XXX_Unmarshal(b []byte) error { |
| 50 | return xxx_messageInfo_CurrentLibraryConfig.Unmarshal(m, b) |
| 51 | } |
| 52 | func (m *CurrentLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 53 | return xxx_messageInfo_CurrentLibraryConfig.Marshal(b, m, deterministic) |
| 54 | } |
| 55 | func (m *CurrentLibraryConfig) XXX_Merge(src proto.Message) { |
| 56 | xxx_messageInfo_CurrentLibraryConfig.Merge(m, src) |
| 57 | } |
| 58 | func (m *CurrentLibraryConfig) XXX_Size() int { |
| 59 | return xxx_messageInfo_CurrentLibraryConfig.Size(m) |
| 60 | } |
| 61 | func (m *CurrentLibraryConfig) XXX_DiscardUnknown() { |
| 62 | xxx_messageInfo_CurrentLibraryConfig.DiscardUnknown(m) |
| 63 | } |
| 64 | |
| 65 | var xxx_messageInfo_CurrentLibraryConfig proto.InternalMessageInfo |
| 66 | |
| 67 | func (m *CurrentLibraryConfig) GetNode() *v1.Node { |
| 68 | if m != nil { |
| 69 | return m.Node |
| 70 | } |
| 71 | return nil |
| 72 | } |
| 73 | |
| 74 | func (m *CurrentLibraryConfig) GetConfig() *v11.TraceConfig { |
| 75 | if m != nil { |
| 76 | return m.Config |
| 77 | } |
| 78 | return nil |
| 79 | } |
| 80 | |
| 81 | type UpdatedLibraryConfig struct { |
| 82 | // This field is ignored when the RPC is used to configure only one Application. |
| 83 | // This is required only in the first message on the stream or if the |
| 84 | // previous sent UpdatedLibraryConfig message has a different Node. |
| 85 | Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` |
| 86 | // Requested updated configuration. |
| 87 | Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` |
| 88 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 89 | XXX_unrecognized []byte `json:"-"` |
| 90 | XXX_sizecache int32 `json:"-"` |
| 91 | } |
| 92 | |
| 93 | func (m *UpdatedLibraryConfig) Reset() { *m = UpdatedLibraryConfig{} } |
| 94 | func (m *UpdatedLibraryConfig) String() string { return proto.CompactTextString(m) } |
| 95 | func (*UpdatedLibraryConfig) ProtoMessage() {} |
| 96 | func (*UpdatedLibraryConfig) Descriptor() ([]byte, []int) { |
| 97 | return fileDescriptor_7027f99caf7ac6a5, []int{1} |
| 98 | } |
| 99 | |
| 100 | func (m *UpdatedLibraryConfig) XXX_Unmarshal(b []byte) error { |
| 101 | return xxx_messageInfo_UpdatedLibraryConfig.Unmarshal(m, b) |
| 102 | } |
| 103 | func (m *UpdatedLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 104 | return xxx_messageInfo_UpdatedLibraryConfig.Marshal(b, m, deterministic) |
| 105 | } |
| 106 | func (m *UpdatedLibraryConfig) XXX_Merge(src proto.Message) { |
| 107 | xxx_messageInfo_UpdatedLibraryConfig.Merge(m, src) |
| 108 | } |
| 109 | func (m *UpdatedLibraryConfig) XXX_Size() int { |
| 110 | return xxx_messageInfo_UpdatedLibraryConfig.Size(m) |
| 111 | } |
| 112 | func (m *UpdatedLibraryConfig) XXX_DiscardUnknown() { |
| 113 | xxx_messageInfo_UpdatedLibraryConfig.DiscardUnknown(m) |
| 114 | } |
| 115 | |
| 116 | var xxx_messageInfo_UpdatedLibraryConfig proto.InternalMessageInfo |
| 117 | |
| 118 | func (m *UpdatedLibraryConfig) GetNode() *v1.Node { |
| 119 | if m != nil { |
| 120 | return m.Node |
| 121 | } |
| 122 | return nil |
| 123 | } |
| 124 | |
| 125 | func (m *UpdatedLibraryConfig) GetConfig() *v11.TraceConfig { |
| 126 | if m != nil { |
| 127 | return m.Config |
| 128 | } |
| 129 | return nil |
| 130 | } |
| 131 | |
| 132 | type ExportTraceServiceRequest struct { |
| 133 | // This is required only in the first message on the stream or if the |
| 134 | // previous sent ExportTraceServiceRequest message has a different Node (e.g. |
| 135 | // when the same RPC is used to send Spans from multiple Applications). |
| 136 | Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` |
| 137 | // A list of Spans that belong to the last received Node. |
| 138 | Spans []*v11.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` |
| 139 | // The resource for the spans in this message that do not have an explicit |
| 140 | // resource set. |
| 141 | // If unset, the most recently set resource in the RPC stream applies. It is |
| 142 | // valid to never be set within a stream, e.g. when no resource info is known. |
| 143 | Resource *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` |
| 144 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 145 | XXX_unrecognized []byte `json:"-"` |
| 146 | XXX_sizecache int32 `json:"-"` |
| 147 | } |
| 148 | |
| 149 | func (m *ExportTraceServiceRequest) Reset() { *m = ExportTraceServiceRequest{} } |
| 150 | func (m *ExportTraceServiceRequest) String() string { return proto.CompactTextString(m) } |
| 151 | func (*ExportTraceServiceRequest) ProtoMessage() {} |
| 152 | func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) { |
| 153 | return fileDescriptor_7027f99caf7ac6a5, []int{2} |
| 154 | } |
| 155 | |
| 156 | func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error { |
| 157 | return xxx_messageInfo_ExportTraceServiceRequest.Unmarshal(m, b) |
| 158 | } |
| 159 | func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 160 | return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic) |
| 161 | } |
| 162 | func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message) { |
| 163 | xxx_messageInfo_ExportTraceServiceRequest.Merge(m, src) |
| 164 | } |
| 165 | func (m *ExportTraceServiceRequest) XXX_Size() int { |
| 166 | return xxx_messageInfo_ExportTraceServiceRequest.Size(m) |
| 167 | } |
| 168 | func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() { |
| 169 | xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m) |
| 170 | } |
| 171 | |
| 172 | var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo |
| 173 | |
| 174 | func (m *ExportTraceServiceRequest) GetNode() *v1.Node { |
| 175 | if m != nil { |
| 176 | return m.Node |
| 177 | } |
| 178 | return nil |
| 179 | } |
| 180 | |
| 181 | func (m *ExportTraceServiceRequest) GetSpans() []*v11.Span { |
| 182 | if m != nil { |
| 183 | return m.Spans |
| 184 | } |
| 185 | return nil |
| 186 | } |
| 187 | |
| 188 | func (m *ExportTraceServiceRequest) GetResource() *v12.Resource { |
| 189 | if m != nil { |
| 190 | return m.Resource |
| 191 | } |
| 192 | return nil |
| 193 | } |
| 194 | |
| 195 | type ExportTraceServiceResponse struct { |
| 196 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 197 | XXX_unrecognized []byte `json:"-"` |
| 198 | XXX_sizecache int32 `json:"-"` |
| 199 | } |
| 200 | |
| 201 | func (m *ExportTraceServiceResponse) Reset() { *m = ExportTraceServiceResponse{} } |
| 202 | func (m *ExportTraceServiceResponse) String() string { return proto.CompactTextString(m) } |
| 203 | func (*ExportTraceServiceResponse) ProtoMessage() {} |
| 204 | func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) { |
| 205 | return fileDescriptor_7027f99caf7ac6a5, []int{3} |
| 206 | } |
| 207 | |
| 208 | func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error { |
| 209 | return xxx_messageInfo_ExportTraceServiceResponse.Unmarshal(m, b) |
| 210 | } |
| 211 | func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 212 | return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic) |
| 213 | } |
| 214 | func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message) { |
| 215 | xxx_messageInfo_ExportTraceServiceResponse.Merge(m, src) |
| 216 | } |
| 217 | func (m *ExportTraceServiceResponse) XXX_Size() int { |
| 218 | return xxx_messageInfo_ExportTraceServiceResponse.Size(m) |
| 219 | } |
| 220 | func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() { |
| 221 | xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m) |
| 222 | } |
| 223 | |
| 224 | var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo |
| 225 | |
| 226 | func init() { |
| 227 | proto.RegisterType((*CurrentLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.CurrentLibraryConfig") |
| 228 | proto.RegisterType((*UpdatedLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.UpdatedLibraryConfig") |
| 229 | proto.RegisterType((*ExportTraceServiceRequest)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceRequest") |
| 230 | proto.RegisterType((*ExportTraceServiceResponse)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceResponse") |
| 231 | } |
| 232 | |
| 233 | func init() { |
| 234 | proto.RegisterFile("opencensus/proto/agent/trace/v1/trace_service.proto", fileDescriptor_7027f99caf7ac6a5) |
| 235 | } |
| 236 | |
| 237 | var fileDescriptor_7027f99caf7ac6a5 = []byte{ |
| 238 | // 442 bytes of a gzipped FileDescriptorProto |
| 239 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xcf, 0xaa, 0xd4, 0x30, |
| 240 | 0x14, 0xc6, 0x4d, 0xaf, 0x16, 0xc9, 0x75, 0x63, 0x71, 0x51, 0x8b, 0x30, 0x97, 0x82, 0x32, 0xa0, |
| 241 | 0x4d, 0xed, 0x5c, 0xee, 0xe6, 0x0a, 0x82, 0x33, 0x08, 0x2e, 0x44, 0x2f, 0x1d, 0x75, 0xe1, 0x66, |
| 242 | 0xe8, 0xb4, 0xc7, 0xda, 0xc5, 0x24, 0x31, 0x49, 0x8b, 0x82, 0x7b, 0xf7, 0x2e, 0x7c, 0x03, 0x5f, |
| 243 | 0xc8, 0xc7, 0xf0, 0x29, 0xa4, 0x39, 0x9d, 0x3f, 0x3a, 0x53, 0x0b, 0xba, 0xb9, 0xbb, 0x43, 0xf3, |
| 244 | 0xfd, 0xbe, 0xf3, 0x25, 0x39, 0x29, 0x3d, 0x15, 0x12, 0x78, 0x0e, 0x5c, 0xd7, 0x3a, 0x96, 0x4a, |
| 245 | 0x18, 0x11, 0x67, 0x25, 0x70, 0x13, 0x1b, 0x95, 0xe5, 0x10, 0x37, 0x09, 0x16, 0x0b, 0x0d, 0xaa, |
| 246 | 0xa9, 0x72, 0x60, 0x56, 0xe2, 0x8d, 0xb6, 0x10, 0x7e, 0x61, 0x16, 0x62, 0x56, 0xcb, 0x9a, 0x24, |
| 247 | 0x88, 0x7a, 0x5c, 0x73, 0xb1, 0x5a, 0x09, 0xde, 0xda, 0x62, 0x85, 0x74, 0x70, 0x7f, 0x4f, 0xae, |
| 248 | 0x40, 0x8b, 0x5a, 0x61, 0x82, 0x75, 0xdd, 0x89, 0xef, 0xee, 0x89, 0x7f, 0xcf, 0xda, 0xc9, 0x1e, |
| 249 | 0x0c, 0xc8, 0x16, 0xb9, 0xe0, 0xef, 0xaa, 0x12, 0xd5, 0xe1, 0x57, 0x42, 0x6f, 0xcd, 0x6a, 0xa5, |
| 250 | 0x80, 0x9b, 0xe7, 0xd5, 0x52, 0x65, 0xea, 0xd3, 0xcc, 0x2e, 0x7b, 0xe7, 0xf4, 0x2a, 0x17, 0x05, |
| 251 | 0xf8, 0xe4, 0x84, 0x8c, 0x8f, 0x27, 0xf7, 0x58, 0xcf, 0xce, 0xbb, 0xed, 0x34, 0x09, 0x7b, 0x21, |
| 252 | 0x0a, 0x48, 0x2d, 0xe3, 0x3d, 0xa6, 0x2e, 0x36, 0xf1, 0x9d, 0x3e, 0x7a, 0x7d, 0x62, 0xec, 0x55, |
| 253 | 0x5b, 0x60, 0xcf, 0xb4, 0xa3, 0x6c, 0xa8, 0xd7, 0xb2, 0xc8, 0x0c, 0x14, 0x97, 0x27, 0xd4, 0x0f, |
| 254 | 0x42, 0x6f, 0x3f, 0xfd, 0x28, 0x85, 0x32, 0x76, 0x75, 0x8e, 0x83, 0x91, 0xc2, 0x87, 0x1a, 0xb4, |
| 255 | 0xf9, 0xaf, 0x64, 0x67, 0xf4, 0x9a, 0x96, 0x19, 0xd7, 0xbe, 0x73, 0x72, 0x34, 0x3e, 0x9e, 0x8c, |
| 256 | 0xfe, 0x12, 0x6c, 0x2e, 0x33, 0x9e, 0xa2, 0xda, 0x9b, 0xd2, 0xeb, 0xeb, 0x09, 0xf1, 0x8f, 0xfa, |
| 257 | 0xda, 0x6e, 0x66, 0xa8, 0x49, 0x58, 0xda, 0xd5, 0xe9, 0x86, 0x0b, 0xef, 0xd0, 0xe0, 0xd0, 0x9e, |
| 258 | 0xb4, 0x14, 0x5c, 0xc3, 0xe4, 0x9b, 0x43, 0x6f, 0xec, 0x2e, 0x78, 0x9f, 0xa9, 0xdb, 0xdd, 0xc4, |
| 259 | 0x19, 0x1b, 0x78, 0x0a, 0xec, 0xd0, 0x54, 0x05, 0xc3, 0xd8, 0xa1, 0x7b, 0x0f, 0xaf, 0x8c, 0xc9, |
| 260 | 0x43, 0xe2, 0x7d, 0x21, 0xd4, 0xc5, 0xb4, 0xde, 0xf9, 0xa0, 0x4f, 0xef, 0x55, 0x05, 0x8f, 0xfe, |
| 261 | 0x89, 0xc5, 0x23, 0xc1, 0x24, 0xd3, 0xef, 0x84, 0x86, 0x95, 0x18, 0xf2, 0x99, 0xde, 0xdc, 0xb5, |
| 262 | 0xb8, 0x68, 0x15, 0x17, 0xe4, 0xed, 0xb3, 0xb2, 0x32, 0xef, 0xeb, 0x65, 0x3b, 0x0a, 0x31, 0xc2, |
| 263 | 0x51, 0xc5, 0xb5, 0x51, 0xf5, 0x0a, 0xb8, 0xc9, 0x4c, 0x25, 0x78, 0xbc, 0xf5, 0x8d, 0xf0, 0x05, |
| 264 | 0x97, 0xc0, 0xa3, 0xf2, 0xcf, 0x3f, 0xd4, 0x4f, 0x67, 0xf4, 0x52, 0x02, 0x9f, 0x61, 0x00, 0x6b, |
| 265 | 0xcf, 0x9e, 0xd8, 0x00, 0xb6, 0x2d, 0x7b, 0x93, 0x2c, 0x5d, 0x8b, 0x9f, 0xfe, 0x0a, 0x00, 0x00, |
| 266 | 0xff, 0xff, 0x65, 0x76, 0xd7, 0xb9, 0xed, 0x04, 0x00, 0x00, |
| 267 | } |
| 268 | |
| 269 | // Reference imports to suppress errors if they are not otherwise used. |
| 270 | var _ context.Context |
| 271 | var _ grpc.ClientConn |
| 272 | |
| 273 | // This is a compile-time assertion to ensure that this generated file |
| 274 | // is compatible with the grpc package it is being compiled against. |
| 275 | const _ = grpc.SupportPackageIsVersion4 |
| 276 | |
| 277 | // TraceServiceClient is the client API for TraceService service. |
| 278 | // |
| 279 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 280 | type TraceServiceClient interface { |
| 281 | // After initialization, this RPC must be kept alive for the entire life of |
| 282 | // the application. The agent pushes configs down to applications via a |
| 283 | // stream. |
| 284 | Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error) |
| 285 | // For performance reasons, it is recommended to keep this RPC |
| 286 | // alive for the entire life of the application. |
| 287 | Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error) |
| 288 | } |
| 289 | |
| 290 | type traceServiceClient struct { |
| 291 | cc *grpc.ClientConn |
| 292 | } |
| 293 | |
| 294 | func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient { |
| 295 | return &traceServiceClient{cc} |
| 296 | } |
| 297 | |
| 298 | func (c *traceServiceClient) Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error) { |
| 299 | stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/opencensus.proto.agent.trace.v1.TraceService/Config", opts...) |
| 300 | if err != nil { |
| 301 | return nil, err |
| 302 | } |
| 303 | x := &traceServiceConfigClient{stream} |
| 304 | return x, nil |
| 305 | } |
| 306 | |
| 307 | type TraceService_ConfigClient interface { |
| 308 | Send(*CurrentLibraryConfig) error |
| 309 | Recv() (*UpdatedLibraryConfig, error) |
| 310 | grpc.ClientStream |
| 311 | } |
| 312 | |
| 313 | type traceServiceConfigClient struct { |
| 314 | grpc.ClientStream |
| 315 | } |
| 316 | |
| 317 | func (x *traceServiceConfigClient) Send(m *CurrentLibraryConfig) error { |
| 318 | return x.ClientStream.SendMsg(m) |
| 319 | } |
| 320 | |
| 321 | func (x *traceServiceConfigClient) Recv() (*UpdatedLibraryConfig, error) { |
| 322 | m := new(UpdatedLibraryConfig) |
| 323 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 324 | return nil, err |
| 325 | } |
| 326 | return m, nil |
| 327 | } |
| 328 | |
| 329 | func (c *traceServiceClient) Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error) { |
| 330 | stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[1], "/opencensus.proto.agent.trace.v1.TraceService/Export", opts...) |
| 331 | if err != nil { |
| 332 | return nil, err |
| 333 | } |
| 334 | x := &traceServiceExportClient{stream} |
| 335 | return x, nil |
| 336 | } |
| 337 | |
| 338 | type TraceService_ExportClient interface { |
| 339 | Send(*ExportTraceServiceRequest) error |
| 340 | Recv() (*ExportTraceServiceResponse, error) |
| 341 | grpc.ClientStream |
| 342 | } |
| 343 | |
| 344 | type traceServiceExportClient struct { |
| 345 | grpc.ClientStream |
| 346 | } |
| 347 | |
| 348 | func (x *traceServiceExportClient) Send(m *ExportTraceServiceRequest) error { |
| 349 | return x.ClientStream.SendMsg(m) |
| 350 | } |
| 351 | |
| 352 | func (x *traceServiceExportClient) Recv() (*ExportTraceServiceResponse, error) { |
| 353 | m := new(ExportTraceServiceResponse) |
| 354 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 355 | return nil, err |
| 356 | } |
| 357 | return m, nil |
| 358 | } |
| 359 | |
| 360 | // TraceServiceServer is the server API for TraceService service. |
| 361 | type TraceServiceServer interface { |
| 362 | // After initialization, this RPC must be kept alive for the entire life of |
| 363 | // the application. The agent pushes configs down to applications via a |
| 364 | // stream. |
| 365 | Config(TraceService_ConfigServer) error |
| 366 | // For performance reasons, it is recommended to keep this RPC |
| 367 | // alive for the entire life of the application. |
| 368 | Export(TraceService_ExportServer) error |
| 369 | } |
| 370 | |
| 371 | // UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. |
| 372 | type UnimplementedTraceServiceServer struct { |
| 373 | } |
| 374 | |
| 375 | func (*UnimplementedTraceServiceServer) Config(srv TraceService_ConfigServer) error { |
| 376 | return status.Errorf(codes.Unimplemented, "method Config not implemented") |
| 377 | } |
| 378 | func (*UnimplementedTraceServiceServer) Export(srv TraceService_ExportServer) error { |
| 379 | return status.Errorf(codes.Unimplemented, "method Export not implemented") |
| 380 | } |
| 381 | |
| 382 | func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { |
| 383 | s.RegisterService(&_TraceService_serviceDesc, srv) |
| 384 | } |
| 385 | |
| 386 | func _TraceService_Config_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 387 | return srv.(TraceServiceServer).Config(&traceServiceConfigServer{stream}) |
| 388 | } |
| 389 | |
| 390 | type TraceService_ConfigServer interface { |
| 391 | Send(*UpdatedLibraryConfig) error |
| 392 | Recv() (*CurrentLibraryConfig, error) |
| 393 | grpc.ServerStream |
| 394 | } |
| 395 | |
| 396 | type traceServiceConfigServer struct { |
| 397 | grpc.ServerStream |
| 398 | } |
| 399 | |
| 400 | func (x *traceServiceConfigServer) Send(m *UpdatedLibraryConfig) error { |
| 401 | return x.ServerStream.SendMsg(m) |
| 402 | } |
| 403 | |
| 404 | func (x *traceServiceConfigServer) Recv() (*CurrentLibraryConfig, error) { |
| 405 | m := new(CurrentLibraryConfig) |
| 406 | if err := x.ServerStream.RecvMsg(m); err != nil { |
| 407 | return nil, err |
| 408 | } |
| 409 | return m, nil |
| 410 | } |
| 411 | |
| 412 | func _TraceService_Export_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 413 | return srv.(TraceServiceServer).Export(&traceServiceExportServer{stream}) |
| 414 | } |
| 415 | |
| 416 | type TraceService_ExportServer interface { |
| 417 | Send(*ExportTraceServiceResponse) error |
| 418 | Recv() (*ExportTraceServiceRequest, error) |
| 419 | grpc.ServerStream |
| 420 | } |
| 421 | |
| 422 | type traceServiceExportServer struct { |
| 423 | grpc.ServerStream |
| 424 | } |
| 425 | |
| 426 | func (x *traceServiceExportServer) Send(m *ExportTraceServiceResponse) error { |
| 427 | return x.ServerStream.SendMsg(m) |
| 428 | } |
| 429 | |
| 430 | func (x *traceServiceExportServer) Recv() (*ExportTraceServiceRequest, error) { |
| 431 | m := new(ExportTraceServiceRequest) |
| 432 | if err := x.ServerStream.RecvMsg(m); err != nil { |
| 433 | return nil, err |
| 434 | } |
| 435 | return m, nil |
| 436 | } |
| 437 | |
| 438 | var _TraceService_serviceDesc = grpc.ServiceDesc{ |
| 439 | ServiceName: "opencensus.proto.agent.trace.v1.TraceService", |
| 440 | HandlerType: (*TraceServiceServer)(nil), |
| 441 | Methods: []grpc.MethodDesc{}, |
| 442 | Streams: []grpc.StreamDesc{ |
| 443 | { |
| 444 | StreamName: "Config", |
| 445 | Handler: _TraceService_Config_Handler, |
| 446 | ServerStreams: true, |
| 447 | ClientStreams: true, |
| 448 | }, |
| 449 | { |
| 450 | StreamName: "Export", |
| 451 | Handler: _TraceService_Export_Handler, |
| 452 | ServerStreams: true, |
| 453 | ClientStreams: true, |
| 454 | }, |
| 455 | }, |
| 456 | Metadata: "opencensus/proto/agent/trace/v1/trace_service.proto", |
| 457 | } |