-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhermes_grpc.pb.go
122 lines (101 loc) · 3.18 KB
/
hermes_grpc.pb.go
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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.SupportPackageIsVersion6
// HermesClient is the client API for Hermes 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.
type HermesClient interface {
EventBuff(ctx context.Context, opts ...grpc.CallOption) (Hermes_EventBuffClient, error)
}
type hermesClient struct {
cc grpc.ClientConnInterface
}
func NewHermesClient(cc grpc.ClientConnInterface) HermesClient {
return &hermesClient{cc}
}
func (c *hermesClient) EventBuff(ctx context.Context, opts ...grpc.CallOption) (Hermes_EventBuffClient, error) {
stream, err := c.cc.NewStream(ctx, &_Hermes_serviceDesc.Streams[0], "/proto.Hermes/EventBuff", opts...)
if err != nil {
return nil, err
}
x := &hermesEventBuffClient{stream}
return x, nil
}
type Hermes_EventBuffClient interface {
Send(*Event) error
Recv() (*Event, error)
grpc.ClientStream
}
type hermesEventBuffClient struct {
grpc.ClientStream
}
func (x *hermesEventBuffClient) Send(m *Event) error {
return x.ClientStream.SendMsg(m)
}
func (x *hermesEventBuffClient) Recv() (*Event, error) {
m := new(Event)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// HermesServer is the server API for Hermes service.
// All implementations must embed UnimplementedHermesServer
// for forward compatibility
type HermesServer interface {
EventBuff(Hermes_EventBuffServer) error
mustEmbedUnimplementedHermesServer()
}
// UnimplementedHermesServer must be embedded to have forward compatible implementations.
type UnimplementedHermesServer struct {
}
func (*UnimplementedHermesServer) EventBuff(Hermes_EventBuffServer) error {
return status.Errorf(codes.Unimplemented, "method EventBuff not implemented")
}
func (*UnimplementedHermesServer) mustEmbedUnimplementedHermesServer() {}
func RegisterHermesServer(s *grpc.Server, srv HermesServer) {
s.RegisterService(&_Hermes_serviceDesc, srv)
}
func _Hermes_EventBuff_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(HermesServer).EventBuff(&hermesEventBuffServer{stream})
}
type Hermes_EventBuffServer interface {
Send(*Event) error
Recv() (*Event, error)
grpc.ServerStream
}
type hermesEventBuffServer struct {
grpc.ServerStream
}
func (x *hermesEventBuffServer) Send(m *Event) error {
return x.ServerStream.SendMsg(m)
}
func (x *hermesEventBuffServer) Recv() (*Event, error) {
m := new(Event)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _Hermes_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Hermes",
HandlerType: (*HermesServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "EventBuff",
Handler: _Hermes_EventBuff_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "hermes.proto",
}