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

Unified Diff: milo/api/proto/buildbot.pb.go

Issue 2275123002: Milo: pRPC endpoint for getting Buildbot master data (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Update config tests Created 4 years, 4 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: milo/api/proto/buildbot.pb.go
diff --git a/milo/api/proto/buildbot.pb.go b/milo/api/proto/buildbot.pb.go
new file mode 100644
index 0000000000000000000000000000000000000000..dc2e3c555bae752629f31a6843ba55834c416b2e
--- /dev/null
+++ b/milo/api/proto/buildbot.pb.go
@@ -0,0 +1,186 @@
+// Code generated by protoc-gen-go.
+// source: github.com/luci/luci-go/milo/api/proto/buildbot.proto
+// DO NOT EDIT!
+
+/*
+Package milo is a generated protocol buffer package.
+
+It is generated from these files:
+ github.com/luci/luci-go/milo/api/proto/buildbot.proto
+
+It has these top-level messages:
+ MasterRequest
+ MasterReply
+*/
+package milo
+
+import prpc "github.com/luci/luci-go/grpc/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.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// The request containing the name of the master.
+type MasterRequest struct {
+ Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+}
+
+func (m *MasterRequest) Reset() { *m = MasterRequest{} }
+func (m *MasterRequest) String() string { return proto.CompactTextString(m) }
+func (*MasterRequest) ProtoMessage() {}
+func (*MasterRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+
+// The response message containing master information.
+type MasterReply struct {
+ // Whether the master is internal or not.
+ Internal bool `protobuf:"varint,1,opt,name=internal" json:"internal,omitempty"`
+ // Timestamp of the freshness of the master data.
+ Modified *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=modified" json:"modified,omitempty"`
+ // Gzipped json data of the master.
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (m *MasterReply) Reset() { *m = MasterReply{} }
+func (m *MasterReply) String() string { return proto.CompactTextString(m) }
+func (*MasterReply) ProtoMessage() {}
+func (*MasterReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
+
+func (m *MasterReply) GetModified() *google_protobuf.Timestamp {
+ if m != nil {
+ return m.Modified
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*MasterRequest)(nil), "milo.MasterRequest")
+ proto.RegisterType((*MasterReply)(nil), "milo.MasterReply")
+}
+
+// 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.SupportPackageIsVersion3
+
+// Client API for Buildbot service
+
+type BuildbotClient interface {
+ GetMaster(ctx context.Context, in *MasterRequest, opts ...grpc.CallOption) (*MasterReply, error)
+}
+type buildbotPRPCClient struct {
+ client *prpc.Client
+}
+
+func NewBuildbotPRPCClient(client *prpc.Client) BuildbotClient {
+ return &buildbotPRPCClient{client}
+}
+
+func (c *buildbotPRPCClient) GetMaster(ctx context.Context, in *MasterRequest, opts ...grpc.CallOption) (*MasterReply, error) {
+ out := new(MasterReply)
+ err := c.client.Call(ctx, "milo.Buildbot", "GetMaster", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+type buildbotClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewBuildbotClient(cc *grpc.ClientConn) BuildbotClient {
+ return &buildbotClient{cc}
+}
+
+func (c *buildbotClient) GetMaster(ctx context.Context, in *MasterRequest, opts ...grpc.CallOption) (*MasterReply, error) {
+ out := new(MasterReply)
+ err := grpc.Invoke(ctx, "/milo.Buildbot/GetMaster", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for Buildbot service
+
+type BuildbotServer interface {
+ GetMaster(context.Context, *MasterRequest) (*MasterReply, error)
+}
+
+func RegisterBuildbotServer(s prpc.Registrar, srv BuildbotServer) {
+ s.RegisterService(&_Buildbot_serviceDesc, srv)
+}
+
+func _Buildbot_GetMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MasterRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BuildbotServer).GetMaster(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/milo.Buildbot/GetMaster",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BuildbotServer).GetMaster(ctx, req.(*MasterRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _Buildbot_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "milo.Buildbot",
+ HandlerType: (*BuildbotServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetMaster",
+ Handler: _Buildbot_GetMaster_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: fileDescriptor0,
+}
+
+func init() {
+ proto.RegisterFile("github.com/luci/luci-go/milo/api/proto/buildbot.proto", fileDescriptor0)
+}
+
+var fileDescriptor0 = []byte{
+ // 236 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x54, 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