Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: common/api/logdog_coordinator/registration/v1/service.pb.go

Issue 1970823005: LogDog: Add prefix registration endpoint. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-archivist-useconfig
Patch Set: Updated patchset dependency Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Code generated by protoc-gen-go.
2 // source: service.proto
3 // DO NOT EDIT!
4
5 /*
6 Package logdog is a generated protocol buffer package.
7
8 It is generated from these files:
9 service.proto
10
11 It has these top-level messages:
12 RegisterPrefixRequest
13 RegisterPrefixResponse
14 */
15 package logdog
16
17 import prpccommon "github.com/luci/luci-go/common/prpc"
18 import prpc "github.com/luci/luci-go/server/prpc"
19
20 import proto "github.com/golang/protobuf/proto"
21 import fmt "fmt"
22 import math "math"
23 import google_protobuf "github.com/luci/luci-go/common/proto/google"
24
25 import (
26 context "golang.org/x/net/context"
27 grpc "google.golang.org/grpc"
28 )
29
30 // Reference imports to suppress errors if they are not otherwise used.
31 var _ = proto.Marshal
32 var _ = fmt.Errorf
33 var _ = math.Inf
34
35 // This is a compile-time assertion to ensure that this generated file
36 // is compatible with the proto package it is being compiled against.
37 const _ = proto.ProtoPackageIsVersion1
38
39 // RegisterPrefixRequest registers a new Prefix with the Coordinator.
40 type RegisterPrefixRequest struct {
41 // The log stream's project.
42 Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitem pty"`
43 // Optional information about the registering agent.
44 SourceInfo []string `protobuf:"bytes,2,rep,name=source_info,json=sourceI nfo" json:"source_info,omitempty"`
45 // The protobuf version string for this stream.
46 ProtoVersion string `protobuf:"bytes,3,opt,name=proto_version,json=proto Version" json:"proto_version,omitempty"`
47 // The serialized LogStreamDescriptor protobuf for this stream. The stre am's
48 // path is extracted from this field.
49 Desc []byte `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempt y"`
50 // The prefix expiration time. If <= 0, the project's default prefix
51 // expiration period will be applied.
52 //
53 // The prefix will be closed by the Coordinator after its expiration per iod.
54 // Once closed, new stream registration requests will no longer be accep ted.
55 //
56 // If supplied, this value should exceed the timeout of the local task, else
57 // some of the task's streams may be dropped due to failing registration .
58 Expiration *google_protobuf.Duration `protobuf:"bytes,5,opt,name=expirat ion" json:"expiration,omitempty"`
59 }
60
61 func (m *RegisterPrefixRequest) Reset() { *m = RegisterPrefix Request{} }
62 func (m *RegisterPrefixRequest) String() string { return proto.Compac tTextString(m) }
63 func (*RegisterPrefixRequest) ProtoMessage() {}
64 func (*RegisterPrefixRequest) Descriptor() ([]byte, []int) { return fileDescript or0, []int{0} }
65
66 func (m *RegisterPrefixRequest) GetExpiration() *google_protobuf.Duration {
67 if m != nil {
68 return m.Expiration
69 }
70 return nil
71 }
72
73 // The response message for the RegisterPrefix RPC.
74 type RegisterPrefixResponse struct {
75 // Secret is the prefix's secret. This must be included verbatim in Butl er
76 // bundles to assert ownership of this prefix.
77 Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,om itempty"`
78 // The name of the Pub/Sub topic to publish butlerproto-formatted Butler log
79 // bundles to.
80 LogBundleTopic string `protobuf:"bytes,2,opt,name=log_bundle_topic,json= logBundleTopic" json:"log_bundle_topic,omitempty"`
81 }
82
83 func (m *RegisterPrefixResponse) Reset() { *m = RegisterPrefi xResponse{} }
84 func (m *RegisterPrefixResponse) String() string { return proto.Compa ctTextString(m) }
85 func (*RegisterPrefixResponse) ProtoMessage() {}
86 func (*RegisterPrefixResponse) Descriptor() ([]byte, []int) { return fileDescrip tor0, []int{1} }
87
88 func init() {
89 proto.RegisterType((*RegisterPrefixRequest)(nil), "logdog.RegisterPrefix Request")
90 proto.RegisterType((*RegisterPrefixResponse)(nil), "logdog.RegisterPrefi xResponse")
91 }
92
93 // Reference imports to suppress errors if they are not otherwise used.
94 var _ context.Context
95 var _ grpc.ClientConn
96
97 // This is a compile-time assertion to ensure that this generated file
98 // is compatible with the grpc package it is being compiled against.
99 const _ = grpc.SupportPackageIsVersion2
100
101 // Client API for Registration service
102
103 type RegistrationClient interface {
104 // RegisterStream allows a Butler instance to register a log stream with the
105 // Coordinator. Upon success, the Coordinator will return registration
106 // information and streaming parameters to the Butler.
107 //
108 // This should be called by a Butler instance to gain the ability to pub lish
109 // to a prefix space. The caller must have WRITE access to its project's
110 // stream space. If WRITE access is not present, this will fail with the
111 // "PermissionDenied" gRPC code.
112 //
113 // A stream prefix may be registered at most once. Additional registrati on
114 // requests will fail with the "AlreadyExists" gRPC code.
115 RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...g rpc.CallOption) (*RegisterPrefixResponse, error)
116 }
117 type registrationPRPCClient struct {
118 client *prpccommon.Client
119 }
120
121 func NewRegistrationPRPCClient(client *prpccommon.Client) RegistrationClient {
122 return &registrationPRPCClient{client}
123 }
124
125 func (c *registrationPRPCClient) RegisterPrefix(ctx context.Context, in *Registe rPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
126 out := new(RegisterPrefixResponse)
127 err := c.client.Call(ctx, "logdog.Registration", "RegisterPrefix", in, o ut, opts...)
128 if err != nil {
129 return nil, err
130 }
131 return out, nil
132 }
133
134 type registrationClient struct {
135 cc *grpc.ClientConn
136 }
137
138 func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient {
139 return &registrationClient{cc}
140 }
141
142 func (c *registrationClient) RegisterPrefix(ctx context.Context, in *RegisterPre fixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
143 out := new(RegisterPrefixResponse)
144 err := grpc.Invoke(ctx, "/logdog.Registration/RegisterPrefix", in, out, c.cc, opts...)
145 if err != nil {
146 return nil, err
147 }
148 return out, nil
149 }
150
151 // Server API for Registration service
152
153 type RegistrationServer interface {
154 // RegisterStream allows a Butler instance to register a log stream with the
155 // Coordinator. Upon success, the Coordinator will return registration
156 // information and streaming parameters to the Butler.
157 //
158 // This should be called by a Butler instance to gain the ability to pub lish
159 // to a prefix space. The caller must have WRITE access to its project's
160 // stream space. If WRITE access is not present, this will fail with the
161 // "PermissionDenied" gRPC code.
162 //
163 // A stream prefix may be registered at most once. Additional registrati on
164 // requests will fail with the "AlreadyExists" gRPC code.
165 RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefix Response, error)
166 }
167
168 func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer) {
169 s.RegisterService(&_Registration_serviceDesc, srv)
170 }
171
172 func _Registration_RegisterPrefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface {}, error) {
173 in := new(RegisterPrefixRequest)
174 if err := dec(in); err != nil {
175 return nil, err
176 }
177 if interceptor == nil {
178 return srv.(RegistrationServer).RegisterPrefix(ctx, in)
179 }
180 info := &grpc.UnaryServerInfo{
181 Server: srv,
182 FullMethod: "/logdog.Registration/RegisterPrefix",
183 }
184 handler := func(ctx context.Context, req interface{}) (interface{}, erro r) {
185 return srv.(RegistrationServer).RegisterPrefix(ctx, req.(*Regist erPrefixRequest))
186 }
187 return interceptor(ctx, in, info, handler)
188 }
189
190 var _Registration_serviceDesc = grpc.ServiceDesc{
191 ServiceName: "logdog.Registration",
192 HandlerType: (*RegistrationServer)(nil),
193 Methods: []grpc.MethodDesc{
194 {
195 MethodName: "RegisterPrefix",
196 Handler: _Registration_RegisterPrefix_Handler,
197 },
198 },
199 Streams: []grpc.StreamDesc{},
200 }
201
202 var fileDescriptor0 = []byte{
203 // 290 bytes of a gzipped FileDescriptorProto
204 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0x03, 0x31,
205 0x10, 0x86, 0xa9, 0xad, 0x2b, 0x4e, 0xb7, 0x45, 0x02, 0x96, 0x58, 0xb0, 0x96, 0x7a, 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6d, 0xa9, 0xb1, 0xc8, 0x26, 0x90, 0x58, 0x54, 0x06, 0xa3, 0x47, 0x2a, 0xf7, 0x3f, 0xb6,
218 0x84, 0x33, 0x7f, 0xa4, 0x2c, 0xef, 0x9a, 0xa2, 0xc6, 0xcc, 0x51, 0xab, 0x95, 0x77, 0xd9, 0x2d,
219 0x3a, 0xf6, 0xfc, 0x2e, 0xe0, 0xe7, 0x1d, 0x5d, 0x67, 0x90, 0xc6, 0xde, 0x71, 0x16, 0x7b, 0x84,
220 0xf1, 0xcf, 0x59, 0xec, 0x52, 0xc4, 0x7b, 0x8b, 0x3f, 0x6f, 0x39, 0x9d, 0xfd, 0x17, 0xc7, 0x15,
221 0xf3, 0x24, 0xb8, 0xdd, 0x7c, 0x05, 0x00, 0x00, 0xff, 0xff, 0xda, 0x7f, 0x26, 0x0d, 0xc5, 0x01,
222 0x00, 0x00,
223 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698