Merge pull request #1754 from ipfs-cluster/struct-align-comment

Add comments to struct fields that must be aligned.
This commit is contained in:
Hector Sanjuan 2022-09-06 16:23:24 +02:00 committed by GitHub
commit 8c93d4cb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -48,9 +48,9 @@ var logger = logging.Logger("ipfshttp")
// on-demand requests against the configured IPFS daemom
// (such as a pin request).
type Connector struct {
// struct alignment! These fields must be up-front.
updateMetricCount uint64
ipfsPinCount int64
ipfsPinCount int64
ctx context.Context
cancel func()

View File

@ -27,6 +27,7 @@ var logger = logging.Logger("optracker")
// OperationTracker tracks and manages all inflight Operations.
type OperationTracker struct {
// struct alignment. This fields must be upfront!
pinningCount int64
pinErrorCount int64
pinQueuedCount int64