-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathioam_api_grpc.pb.go
More file actions
121 lines (104 loc) · 4.59 KB
/
Copy pathioam_api_grpc.pb.go
File metadata and controls
121 lines (104 loc) · 4.59 KB
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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.1
// source: ioam_api.proto
package ioam_api
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
IOAMService_Report_FullMethodName = "/ioam_api.IOAMService/Report"
)
// IOAMServiceClient is the client API for IOAMService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// IOAM Service
type IOAMServiceClient interface {
// Report an IOAM Trace
Report(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[IOAMTrace, emptypb.Empty], error)
}
type iOAMServiceClient struct {
cc grpc.ClientConnInterface
}
func NewIOAMServiceClient(cc grpc.ClientConnInterface) IOAMServiceClient {
return &iOAMServiceClient{cc}
}
func (c *iOAMServiceClient) Report(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[IOAMTrace, emptypb.Empty], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &IOAMService_ServiceDesc.Streams[0], IOAMService_Report_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[IOAMTrace, emptypb.Empty]{ClientStream: stream}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type IOAMService_ReportClient = grpc.ClientStreamingClient[IOAMTrace, emptypb.Empty]
// IOAMServiceServer is the server API for IOAMService service.
// All implementations must embed UnimplementedIOAMServiceServer
// for forward compatibility.
//
// IOAM Service
type IOAMServiceServer interface {
// Report an IOAM Trace
Report(grpc.ClientStreamingServer[IOAMTrace, emptypb.Empty]) error
mustEmbedUnimplementedIOAMServiceServer()
}
// UnimplementedIOAMServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedIOAMServiceServer struct{}
func (UnimplementedIOAMServiceServer) Report(grpc.ClientStreamingServer[IOAMTrace, emptypb.Empty]) error {
return status.Error(codes.Unimplemented, "method Report not implemented")
}
func (UnimplementedIOAMServiceServer) mustEmbedUnimplementedIOAMServiceServer() {}
func (UnimplementedIOAMServiceServer) testEmbeddedByValue() {}
// UnsafeIOAMServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IOAMServiceServer will
// result in compilation errors.
type UnsafeIOAMServiceServer interface {
mustEmbedUnimplementedIOAMServiceServer()
}
func RegisterIOAMServiceServer(s grpc.ServiceRegistrar, srv IOAMServiceServer) {
// If the following call panics, it indicates UnimplementedIOAMServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&IOAMService_ServiceDesc, srv)
}
func _IOAMService_Report_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(IOAMServiceServer).Report(&grpc.GenericServerStream[IOAMTrace, emptypb.Empty]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type IOAMService_ReportServer = grpc.ClientStreamingServer[IOAMTrace, emptypb.Empty]
// IOAMService_ServiceDesc is the grpc.ServiceDesc for IOAMService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IOAMService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ioam_api.IOAMService",
HandlerType: (*IOAMServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Report",
Handler: _IOAMService_Report_Handler,
ClientStreams: true,
},
},
Metadata: "ioam_api.proto",
}