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

Side by Side Diff: grpc/discovery/registry.go

Issue 2219023003: Update APIs to use new Google cloud paths. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package discovery 5 package discovery
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "compress/gzip" 9 "compress/gzip"
10 "io" 10 "io"
11 "io/ioutil" 11 "io/ioutil"
12 "sync" 12 "sync"
13 13
14 "github.com/golang/protobuf/proto" 14 "github.com/golang/protobuf/proto"
15 15
16 » "github.com/luci/luci-go/common/proto/google/descriptor" 16 » "google.golang.org/genproto/protobuf"
17 ) 17 )
18 18
19 type entry struct { 19 type entry struct {
20 compressedBytes []byte 20 compressedBytes []byte
21 21
22 init sync.Once 22 init sync.Once
23 unmarshaled *descriptor.FileDescriptorSet 23 unmarshaled *descriptor.FileDescriptorSet
24 err error 24 err error
25 } 25 }
26 26
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 var unmarshaled descriptor.FileDescriptorSet 79 var unmarshaled descriptor.FileDescriptorSet
80 e.err = proto.Unmarshal(uncompressed, &unmarshaled) 80 e.err = proto.Unmarshal(uncompressed, &unmarshaled)
81 if e.err != nil { 81 if e.err != nil {
82 return 82 return
83 } 83 }
84 e.unmarshaled = &unmarshaled 84 e.unmarshaled = &unmarshaled
85 }) 85 })
86 return e.unmarshaled, e.err 86 return e.unmarshaled, e.err
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698