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

Side by Side Diff: logdog/client/butler/bundler/bundler.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « logdog/client/butler/bootstrap/env.go ('k') | logdog/client/butler/butler.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 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 bundler 5 package bundler
6 6
7 import ( 7 import (
8 "container/heap" 8 "container/heap"
9 "fmt" 9 "fmt"
10 "sync" 10 "sync"
11 "time" 11 "time"
12 12
13 "github.com/luci/luci-go/common/clock" 13 "github.com/luci/luci-go/common/clock"
14 "github.com/luci/luci-go/common/config"
15 "github.com/luci/luci-go/common/proto/google" 14 "github.com/luci/luci-go/common/proto/google"
16 "github.com/luci/luci-go/common/sync/cancelcond" 15 "github.com/luci/luci-go/common/sync/cancelcond"
17 "github.com/luci/luci-go/logdog/api/logpb" 16 "github.com/luci/luci-go/logdog/api/logpb"
18 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" 17 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto"
19 "github.com/luci/luci-go/logdog/common/types" 18 "github.com/luci/luci-go/logdog/common/types"
19 "github.com/luci/luci-go/luci_config/common/cfgtypes"
20 "golang.org/x/net/context" 20 "golang.org/x/net/context"
21 ) 21 )
22 22
23 // Config is the Bundler configuration. 23 // Config is the Bundler configuration.
24 type Config struct { 24 type Config struct {
25 // Clock is the clock instance that will be used for Bundler and stream 25 // Clock is the clock instance that will be used for Bundler and stream
26 // timing. 26 // timing.
27 Clock clock.Clock 27 Clock clock.Clock
28 28
29 // Project is the project to use. 29 // Project is the project to use.
30 » Project config.ProjectName 30 » Project cfgtypes.ProjectName
31 // Prefix is the common prefix for this set of streams. 31 // Prefix is the common prefix for this set of streams.
32 Prefix types.StreamName 32 Prefix types.StreamName
33 33
34 // MaxBufferedBytes is the maximum number of bytes to buffer in memory p er 34 // MaxBufferedBytes is the maximum number of bytes to buffer in memory p er
35 // stream. 35 // stream.
36 MaxBufferedBytes int64 36 MaxBufferedBytes int64
37 37
38 // MaxBundleSize is the maximum bundle size in bytes that may be generat ed. 38 // MaxBundleSize is the maximum bundle size in bytes that may be generat ed.
39 // 39 //
40 // If this value is zero, no size constraint will be applied to generate d 40 // If this value is zero, no size constraint will be applied to generate d
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 514
515 func (s *streamState) Push(x interface{}) { 515 func (s *streamState) Push(x interface{}) {
516 s.streams = append(s.streams, x.(bundlerStream)) 516 s.streams = append(s.streams, x.(bundlerStream))
517 } 517 }
518 518
519 func (s *streamState) Pop() interface{} { 519 func (s *streamState) Pop() interface{} {
520 last := s.streams[len(s.streams)-1] 520 last := s.streams[len(s.streams)-1]
521 s.streams = s.streams[:len(s.streams)-1] 521 s.streams = s.streams[:len(s.streams)-1]
522 return last 522 return last
523 } 523 }
OLDNEW
« no previous file with comments | « logdog/client/butler/bootstrap/env.go ('k') | logdog/client/butler/butler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698