summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lgc/lgc.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/lgc/lgc.go b/lgc/lgc.go
index 59b623d..13f2c06 100644
--- a/lgc/lgc.go
+++ b/lgc/lgc.go
@@ -40,12 +40,14 @@ type LoadGeneratingConnection interface {
ClientId() uint64
}
+// TODO: All 64-bit fields that are accessed atomically must
+// appear at the top of this struct.
type LoadGeneratingConnectionDownload struct {
- Path string
downloaded uint64
+ lastIntervalEnd int64
+ Path string
downloadStartTime time.Time
lastDownloaded uint64
- lastIntervalEnd int64
client *http.Client
debug debug.DebugLevel
valid bool
@@ -312,12 +314,14 @@ func (lbd *LoadGeneratingConnectionDownload) doDownload(ctx context.Context) {
}
}
+// TODO: All 64-bit fields that are accessed atomically must
+// appear at the top of this struct.
type LoadGeneratingConnectionUpload struct {
- Path string
uploaded uint64
+ lastIntervalEnd int64
+ Path string
uploadStartTime time.Time
lastUploaded uint64
- lastIntervalEnd int64
client *http.Client
debug debug.DebugLevel
valid bool