Commit Graph

19 Commits (8824e46340edf970c220c62f1b0ed4d43736eec4)

Author SHA1 Message Date
Daniel Smith 7aaf76af6e Merge pull request #2661 from smarterclayton/allow_loops_to_exit
Add a util.Forever variant that ends on a stop channel
2014-12-03 11:52:59 -08:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Clayton Coleman 740b824ac2 Add a util.Forever variant that ends on a stop channel 2014-11-28 15:15:52 -05:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
deads2k e348b939bf make api match intent with less specific type 2014-10-08 10:01:55 -04:00
Jessica Forrester becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Tim Hockin 0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Tim Hockin 7201227cb1 Use IntOrString for HTTP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in HTTP health checks.  Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith aa92dd7fb2 Add go fuzzer in preparation for testing. Also gofmt a few files that needed it. 2014-07-27 14:54:48 -07:00
Tim Hockin 7d5398bda7 Fix go idiom feedback 2014-07-11 11:43:42 -07:00
Tim Hockin c134a16c36 fix go lint errors in util 2014-07-10 17:32:42 -07:00
Tim Hockin 85effbbc3f IntOrString for use in JSON/YAML
Specifying an API type as IntOrString will allow JSON and YAML to accept
either ints or strings with the same name.  For example, port names or
numbers.
2014-07-10 11:09:47 -07:00
Daniel Smith 011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -07:00
Tim Hockin 9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Daniel Smith 50b9c34cf1 Fix error recovery. 2014-06-13 18:11:32 -07:00
Daniel Smith 4f848b6d3b Need proper package comment. 2014-06-11 17:20:16 -07:00
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00