aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/acme/main.go16
-rw-r--r--provider.go2
2 files changed, 16 insertions, 2 deletions
diff --git a/cmd/acme/main.go b/cmd/acme/main.go
index ebe6a91..b216793 100644
--- a/cmd/acme/main.go
+++ b/cmd/acme/main.go
@@ -3,11 +3,16 @@ package main
import (
"flag"
"log"
+ "os"
+ "runtime/trace"
"dim13.org/acme"
)
-var confName = flag.String("conf", "acme.toml", "configuration file")
+var (
+ confName = flag.String("conf", "acme.toml", "configuration file")
+ tracing = flag.String("trace", "", "trace output")
+)
func prepare(conf *Config) error {
var err error
@@ -77,6 +82,15 @@ func satisfice(des *desire) error {
func main() {
flag.Parse()
+ if *tracing != "" {
+ f, err := os.Create(*tracing)
+ if err != nil {
+ log.Fatal(err)
+ }
+ trace.Start(f)
+ defer trace.Stop()
+ }
+
conf, err := LoadConfig(*confName)
if err != nil {
log.Fatal(err)
diff --git a/provider.go b/provider.go
index 45ac842..4b4996c 100644
--- a/provider.go
+++ b/provider.go
@@ -61,7 +61,7 @@ func (p Provider) Nonce() (string, error) {
// DialProvider fetches directory and initializes nonce
func DialProvider(directory string) (*Provider, error) {
p := &Provider{
- nonces: make(chan string, 3),
+ nonces: make(chan string, 100),
poll: time.Second,
}
p.Client = http.Client{