b923556f4c
Use a slice instead of a map of io.WriteClosers in broadcastwriter
...
Maps rely on the keys being comparable.
Using an interface type as the map key is dangerous,
because some interface types are not comparable.
I talked about this in my "Stupid Gopher Tricks" talk:
https://talks.golang.org/2015/tricks.slide
In this case, if the user-provided writer is backed by a slice
(such as io.MultiWriter) then the code will panic at run time.
Signed-off-by: Andrew Gerrand <adg@golang.org >
Upstream-commit: 31cbf76d0c287d451182499d4fa0c4fda67e0716
Component: engine
2015-08-21 14:08:04 +01:00
e840b8ec78
Enable golint part of #14756
...
pkg/broadcastwriter
pkg/graphdb
pkg/httputils
pkg/ioutils
Signed-off-by: Lei Jitang <leijitang@huawei.com >
Upstream-commit: 27a8f9937ece67015d06b219bb8aa5cc4f6b7d32
Component: engine
2015-08-03 09:45:05 +08:00
6e5f69c519
remove dead code after decoupling from jsonlog
...
Signed-off-by: Brian Goff <cpuguy83@gmail.com >
Upstream-commit: d3b3ebc3a4e185da08ec049bbeba46e942f30c80
Component: engine
2015-07-21 20:47:35 -04:00
4b9b1a6d15
pkg/broadcastwriter: reset after 4 KB w/o stream
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com >
Upstream-commit: 153f98bad51e2f46cf3853d2da0173bcfb4b687d
Component: engine
2015-04-01 01:26:19 +03:00
bce31440c3
Skip heavy operations if there is no jsonlog writers
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
Upstream-commit: d15d1674c318366e881fa4ea2977192750d3471b
Component: engine
2015-04-01 01:02:18 +03:00
e1d3084c1a
pkg/broadcastwriter: use []byte to lower alloc
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com >
Upstream-commit: 5550a46946a2e6e1be8844d78a78122b333fae26
Component: engine
2015-04-01 01:02:18 +03:00
25208704c6
pkg/broadcastwriter: add test w/ "" stream only
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com >
Upstream-commit: f26f405b00a2d9d1c6ebc11bffb810c54ac510ce
Component: engine
2015-04-01 01:02:18 +03:00
78bf03cec8
pkg/broadcastwriter: avoid alloc w/ WriteString
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com >
Upstream-commit: db877d8a425a3c063eedb1908ab1b50df1a33a57
Component: engine
2015-03-29 15:20:53 +03:00
e5b36a723c
Replace aliased imports of logrus, fixes #11762
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
bad39206ea
Mass gofmt
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com >
Upstream-commit: ee7dd44c017458c8fe0be8e09569b1238366dca3
Component: engine
2014-10-24 15:11:48 -07:00
2d56e3cbc6
Use logrus everywhere for logging
...
Fixed #8761
Signed-off-by: Alexandr Morozov <lk4d4@docker.com >
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
a9aedbcc8a
use custom marshalling for JSONLog
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com > (github: unclejack)
Upstream-commit: 9851e8c4c18a89327ec2c1f04e36c9932c4231c1
Component: engine
2014-09-17 17:03:54 +03:00
4737f7cea5
Extract log utils into pkg/log
...
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net > (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
325695b856
utils.Debugf -> log.Printf, move jsonlog to own package.
...
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org > (github: erikh)
Upstream-commit: 5cdb9c8acab75df74d20cd937e4091dacb355160
Component: engine
2014-08-06 16:39:01 -07:00
00eca7c915
utils/broadcastwriter -> pkg/broadcastwriter
...
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org > (github: erikh)
Upstream-commit: 5ab09f2f7129225220fc9c0b76b2e2aec6823ee1
Component: engine
2014-08-06 16:37:01 -07:00