diff options
Diffstat (limited to 'instance.go')
-rw-r--r-- | instance.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/instance.go b/instance.go index 843e9f8..65ebcb3 100644 --- a/instance.go +++ b/instance.go @@ -43,6 +43,10 @@ func (p LogParameters) String() string { return fmt.Sprintf("LogId(%s) TreeId(%d) Prefix(%s) NumAnchors(%d)", base64.StdEncoding.EncodeToString(p.LogId), p.TreeId, p.Prefix, len(p.AnchorList)) } +func (i *LogParameters) id() string { + return base64.StdEncoding.EncodeToString(i.LogId) +} + // NewInstance returns a new STFE Instance func NewInstance(lp *LogParameters, client trillian.TrillianLogClient, deadline time.Duration, mux *http.ServeMux) (*Instance, error) { i := &Instance{ @@ -51,6 +55,7 @@ func NewInstance(lp *LogParameters, client trillian.TrillianLogClient, deadline Deadline: deadline, } i.registerHandlers(mux) + once.Do(metricSetup) return i, nil } |