We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 21a0476 + 87e24e4 commit 8207364Copy full SHA for 8207364
2 files changed
publisher/image/Dockerfile
@@ -1,5 +1,9 @@
1
FROM alpine:3.1
2
3
+# install curl in the image so it is possible to get the runtime
4
+# profiling information without any additional package installation.
5
+RUN apk add --update-cache curl && rm -rf /var/cache/apk/*
6
+
7
ADD bin/publisher /usr/local/bin/publisher
8
ENTRYPOINT ["/usr/local/bin/publisher"]
9
publisher/main.go
@@ -3,6 +3,8 @@ package main
import (
"flag"
"log"
+ "net/http"
+ _ "net/http/pprof"
"time"
10
"github.com/coreos/go-etcd/etcd"
@@ -44,6 +46,10 @@ func main() {
44
46
45
47
go server.Listen(*etcdTTL)
48
49
+ go func() {
50
+ log.Println(http.ListenAndServe("localhost:6060", nil))
51
+ }()
52
53
for {
54
go server.Poll(*etcdTTL)
55
time.Sleep(*refreshDuration)
0 commit comments