-
Notifications
You must be signed in to change notification settings - Fork 173
/
cells-message_grpc.stub.pb.go
85 lines (76 loc) · 2.16 KB
/
cells-message_grpc.stub.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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-client-stub v1.1.0
// - protoc v3.18.1
// source: cells-message.proto
package broker
import (
context "context"
fmt "fmt"
stubs "github.com/pydio/cells/v4/common/server/stubs"
grpc "google.golang.org/grpc"
io "io"
)
// 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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
type BrokerStub struct {
BrokerServer
}
func (s *BrokerStub) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error {
fmt.Println("Serving", method, args, reply, opts)
var e error
switch method {
default:
e = fmt.Errorf(method + " not implemented")
}
return e
}
func (s *BrokerStub) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
fmt.Println("Serving", method)
switch method {
case "/broker.Broker/Publish":
st := &BrokerStub_PublishStreamer{}
st.Init(ctx)
go s.BrokerServer.Publish(st)
return st, nil
case "/broker.Broker/Subscribe":
st := &BrokerStub_SubscribeStreamer{}
st.Init(ctx)
go s.BrokerServer.Subscribe(st)
return st, nil
}
return nil, fmt.Errorf(method + " not implemented")
}
type BrokerStub_PublishStreamer struct {
stubs.BidirServerStreamerCore
}
func (s *BrokerStub_PublishStreamer) Recv() (*PublishRequest, error) {
if req, o := <-s.ReqChan; o {
return req.(*PublishRequest), nil
} else {
return nil, io.EOF
}
}
func (s *BrokerStub_PublishStreamer) Send(response *Empty) error {
s.RespChan <- response
return nil
}
func (s *BrokerStub_PublishStreamer) SendAndClose(*Empty) error {
return nil
}
type BrokerStub_SubscribeStreamer struct {
stubs.BidirServerStreamerCore
}
func (s *BrokerStub_SubscribeStreamer) Recv() (*SubscribeRequest, error) {
if req, o := <-s.ReqChan; o {
return req.(*SubscribeRequest), nil
} else {
return nil, io.EOF
}
}
func (s *BrokerStub_SubscribeStreamer) Send(response *SubscribeResponse) error {
s.RespChan <- response
return nil
}