This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> env DYLD_PRINT_LIBRARIES=1 git clone https://github.com/nixos/nixpkgs | |
dyld: loaded: /Users/bernerdschaefer/.nix-profile/bin/git | |
dyld: loaded: /nix/store/m911p5va12l3h0hb888fv2lg9vw6h0lf-zlib-1.2.8/lib/libz.1.dylib | |
dyld: loaded: /usr/lib/libiconv.2.dylib | |
dyld: loaded: /nix/store/r3y5kv9yfz3x50b62rb7q36dkrg9swia-gettext-0.18.2/lib/libintl.8.dylib | |
dyld: loaded: /nix/store/8q141rqwrpgnapzv44hbwqag78fbirzq-openssl-1.0.1i/lib/libcrypto.1.0.0.dylib | |
dyld: loaded: /usr/lib/libSystem.B.dylib | |
dyld: loaded: /nix/store/qw2dgl7xdqj574g3lrafw9rq7npcshhy-gcc-4.8.3/lib/libgcc_s.1.dylib | |
dyld: loaded: /usr/lib/system/libcache.dylib | |
dyld: loaded: /usr/lib/system/libcommonCrypto.dylib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <sched.h> | |
#include <stdio.h> | |
int _start_container(void *arg) | |
{ | |
return execl("/bin/bash", "bash", "-c", "echo $$", (char*) NULL); | |
} | |
int main(int argc, char *argv[]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// like io.Pipe(), but returns two connected ReadWriteClosers. | |
func newConn() (io.ReadWriteCloser, io.ReadWriteCloser) { | |
type rwc struct { | |
io.Reader | |
io.WriteCloser | |
} | |
rs, wc := io.Pipe() | |
rc, ws := io.Pipe() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
set -e | |
echo "starting doozer:8046" | |
doozerd -timeout 10 -hist 100 -l "127.0.0.1:8046" -w ":8080" -c test &>tmp/8046.log & | |
sleep 1 | |
echo "starting doozer:8047" | |
doozerd -timeout 10 -hist 100 -l "127.0.0.1:8047" -w false -b "doozer:?ca=127.0.0.1:8046" -c test &>tmp/8047.log & | |
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
set -e | |
echo "starting doozer:8046" | |
doozerd -timeout 30 -hist 1000 -l "127.0.0.1:8046" -w ":8080" -c test &>tmp/8046.log & | |
sleep 1 | |
echo "starting doozer:8047" | |
doozerd -timeout 30 -hist 1000 -l "127.0.0.1:8047" -w false -b "doozer:?ca=127.0.0.1:8046" -c test &>tmp/8047.log & | |
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eventsource | |
type Metadata map[string]string | |
func (Metadata) Set(key, value string) | |
func (Metadata) Get(key string) (string, bool) | |
func (Metadata) Del(key string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
config := MustLoadConfig(*configFile) | |
storage := MustNewStorage( | |
*memoryAppendQueueCapacity, | |
*diskAppendQueueCapacity, | |
100, // ? | |
time.Second*30, // ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./prometheus | |
prometheus, version c5e507c (master) | |
build user: bernerd@Bernerds-MacBook-Air.local | |
build date: 20130503-12:08:32 | |
go version: 1.0.3 | |
leveldb version: 1.9.0 | |
protobuf version: 2.5.0 | |
snappy version: 1.1.0 | |
2013/05/03 12:53:16 Pool for job prometheus does not exist; creating and starting... | |
2013/05/03 12:53:16 All EndPoints for service [ MetricsService ] , registered under root path: /api/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prints "Storage is closed; exiting" and then hangs | |
package main | |
import ( | |
"github.com/jmhodges/levigo" | |
"log" | |
) | |
func main() { | |
options := levigo.NewOptions() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/prometheus/registry.go b/prometheus/registry.go | |
index ebe9871..32b4192 100644 | |
--- a/prometheus/registry.go | |
+++ b/prometheus/registry.go | |
@@ -14,6 +14,7 @@ import ( | |
"fmt" | |
"io" | |
"log" | |
+ "mime" | |
"net/http" |