summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lgc/lgc.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/lgc/lgc.go b/lgc/lgc.go
index b4a632c..d61ddf2 100644
--- a/lgc/lgc.go
+++ b/lgc/lgc.go
@@ -22,6 +22,7 @@ import (
"io/ioutil"
"net/http"
"net/http/httptrace"
+ "sync"
"sync/atomic"
"time"
@@ -41,6 +42,15 @@ type LoadGeneratingConnection interface {
Stats() *stats.TraceStats
}
+type LoadGeneratingConnectionCollection struct {
+ Lock sync.Mutex
+ LGCs *[]LoadGeneratingConnection
+}
+
+func NewLoadGeneratingConnectionCollection() LoadGeneratingConnectionCollection {
+ return LoadGeneratingConnectionCollection{LGCs: new([]LoadGeneratingConnection)}
+}
+
// TODO: All 64-bit fields that are accessed atomically must
// appear at the top of this struct.
type LoadGeneratingConnectionDownload struct {