diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-05-08 14:28:24 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-05-08 14:43:19 +0200 |
commit | 0cb9520b6a60ba10e09a25e6b52fd1da185bb555 (patch) | |
tree | bbb731658e2b2d7bff20aabbeb453e0962640b73 /client | |
parent | b70739a655a99836f47625d13a4f6806b1d4f784 (diff) |
Optimize field alignment
Diffstat (limited to 'client')
-rw-r--r-- | client/go/internal/vespa/document/document.go | 6 | ||||
-rw-r--r-- | client/go/internal/vespa/document/feeder.go | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/client/go/internal/vespa/document/document.go b/client/go/internal/vespa/document/document.go index 984f3d3741a..101761e01d0 100644 --- a/client/go/internal/vespa/document/document.go +++ b/client/go/internal/vespa/document/document.go @@ -93,10 +93,10 @@ func ParseId(serialized string) (Id, error) { // Document represents a Vespa document operation. type Document struct { Id Id - Operation Operation Condition string - Create bool Fields []byte + Operation Operation + Create bool } type jsonDocument struct { @@ -105,8 +105,8 @@ type jsonDocument struct { UpdateId string `json:"update"` RemoveId string `json:"remove"` Condition string `json:"condition"` - Create bool `json:"create"` Fields json.RawMessage `json:"fields"` + Create bool `json:"create"` } // Decoder decodes documents from a JSON structure which is either an array of objects, or objects separated by newline. diff --git a/client/go/internal/vespa/document/feeder.go b/client/go/internal/vespa/document/feeder.go index 761f76398c4..6bcd4afe916 100644 --- a/client/go/internal/vespa/document/feeder.go +++ b/client/go/internal/vespa/document/feeder.go @@ -21,13 +21,13 @@ const ( // Result represents the result of a feeding operation. type Result struct { + Err error Id Id - Status Status - HTTPStatus int Message string Trace string - Err error Stats Stats + Status Status + HTTPStatus int } func (r Result) Success() bool { @@ -36,9 +36,9 @@ func (r Result) Success() bool { // Stats represents feeding operation statistics. type Stats struct { + ResponsesByCode map[int]int64 Requests int64 Responses int64 - ResponsesByCode map[int]int64 Errors int64 Inflight int64 TotalLatency time.Duration |