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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: common/api/logdog_coordinator/registration/v1/service.pb.go
diff --git a/common/api/logdog_coordinator/registration/v1/service.pb.go b/common/api/logdog_coordinator/registration/v1/service.pb.go
new file mode 100644
index 0000000000000000000000000000000000000000..b76d82936379bb1807f3ba188e4e329a3c8bd55b
--- /dev/null
+++ b/common/api/logdog_coordinator/registration/v1/service.pb.go
@@ -0,0 +1,223 @@
+// Code generated by protoc-gen-go.
+// source: service.proto
+// DO NOT EDIT!
+
+/*
+Package logdog is a generated protocol buffer package.
+
+It is generated from these files:
+ service.proto
+
+It has these top-level messages:
+ RegisterPrefixRequest
+ RegisterPrefixResponse
+*/
+package logdog
+
+import prpccommon "github.com/luci/luci-go/common/prpc"
+import prpc "github.com/luci/luci-go/server/prpc"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import google_protobuf "github.com/luci/luci-go/common/proto/google"
+
+import (
+ context "golang.org/x/net/context"
+ grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+const _ = proto.ProtoPackageIsVersion1
+
+// RegisterPrefixRequest registers a new Prefix with the Coordinator.
+type RegisterPrefixRequest struct {
+ // The log stream's project.
+ Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
+ // Optional information about the registering agent.
+ SourceInfo []string `protobuf:"bytes,2,rep,name=source_info,json=sourceInfo" json:"source_info,omitempty"`
+ // The protobuf version string for this stream.
+ ProtoVersion string `protobuf:"bytes,3,opt,name=proto_version,json=protoVersion" json:"proto_version,omitempty"`
+ // The serialized LogStreamDescriptor protobuf for this stream. The stream's
+ // path is extracted from this field.
+ Desc []byte `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"`
+ // The prefix expiration time. If <= 0, the project's default prefix
+ // expiration period will be applied.
+ //
+ // The prefix will be closed by the Coordinator after its expiration period.
+ // Once closed, new stream registration requests will no longer be accepted.
+ //
+ // If supplied, this value should exceed the timeout of the local task, else
+ // some of the task's streams may be dropped due to failing registration.
+ Expiration *google_protobuf.Duration `protobuf:"bytes,5,opt,name=expiration" json:"expiration,omitempty"`
+}
+
+func (m *RegisterPrefixRequest) Reset() { *m = RegisterPrefixRequest{} }
+func (m *RegisterPrefixRequest) String() string { return proto.CompactTextString(m) }
+func (*RegisterPrefixRequest) ProtoMessage() {}
+func (*RegisterPrefixRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+
+func (m *RegisterPrefixRequest) GetExpiration() *google_protobuf.Duration {
+ if m != nil {
+ return m.Expiration
+ }
+ return nil
+}
+
+// The response message for the RegisterPrefix RPC.
+type RegisterPrefixResponse struct {
+ // Secret is the prefix's secret. This must be included verbatim in Butler
+ // bundles to assert ownership of this prefix.
+ Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
+ // The name of the Pub/Sub topic to publish butlerproto-formatted Butler log
+ // bundles to.
+ LogBundleTopic string `protobuf:"bytes,2,opt,name=log_bundle_topic,json=logBundleTopic" json:"log_bundle_topic,omitempty"`
+}
+
+func (m *RegisterPrefixResponse) Reset() { *m = RegisterPrefixResponse{} }
+func (m *RegisterPrefixResponse) String() string { return proto.CompactTextString(m) }
+func (*RegisterPrefixResponse) ProtoMessage() {}
+func (*RegisterPrefixResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
+
+func init() {
+ proto.RegisterType((*RegisterPrefixRequest)(nil), "logdog.RegisterPrefixRequest")
+ proto.RegisterType((*RegisterPrefixResponse)(nil), "logdog.RegisterPrefixResponse")
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// 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.SupportPackageIsVersion2
+
+// Client API for Registration service
+
+type RegistrationClient interface {
+ // RegisterStream allows a Butler instance to register a log stream with the
+ // Coordinator. Upon success, the Coordinator will return registration
+ // information and streaming parameters to the Butler.
+ //
+ // This should be called by a Butler instance to gain the ability to publish
+ // to a prefix space. The caller must have WRITE access to its project's
+ // stream space. If WRITE access is not present, this will fail with the
+ // "PermissionDenied" gRPC code.
+ //
+ // A stream prefix may be registered at most once. Additional registration
+ // requests will fail with the "AlreadyExists" gRPC code.
+ RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error)
+}
+type registrationPRPCClient struct {
+ client *prpccommon.Client
+}
+
+func NewRegistrationPRPCClient(client *prpccommon.Client) RegistrationClient {
+ return &registrationPRPCClient{client}
+}
+
+func (c *registrationPRPCClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
+ out := new(RegisterPrefixResponse)
+ err := c.client.Call(ctx, "logdog.Registration", "RegisterPrefix", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+type registrationClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient {
+ return &registrationClient{cc}
+}
+
+func (c *registrationClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
+ out := new(RegisterPrefixResponse)
+ err := grpc.Invoke(ctx, "/logdog.Registration/RegisterPrefix", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for Registration service
+
+type RegistrationServer interface {
+ // RegisterStream allows a Butler instance to register a log stream with the
+ // Coordinator. Upon success, the Coordinator will return registration
+ // information and streaming parameters to the Butler.
+ //
+ // This should be called by a Butler instance to gain the ability to publish
+ // to a prefix space. The caller must have WRITE access to its project's
+ // stream space. If WRITE access is not present, this will fail with the
+ // "PermissionDenied" gRPC code.
+ //
+ // A stream prefix may be registered at most once. Additional registration
+ // requests will fail with the "AlreadyExists" gRPC code.
+ RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error)
+}
+
+func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer) {
+ s.RegisterService(&_Registration_serviceDesc, srv)
+}
+
+func _Registration_RegisterPrefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RegisterPrefixRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RegistrationServer).RegisterPrefix(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/logdog.Registration/RegisterPrefix",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RegistrationServer).RegisterPrefix(ctx, req.(*RegisterPrefixRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _Registration_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "logdog.Registration",
+ HandlerType: (*RegistrationServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "RegisterPrefix",
+ Handler: _Registration_RegisterPrefix_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+}
+
+var fileDescriptor0 = []byte{
+ // 290 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0xc1,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