diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-07-24 01:36:04 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-07-24 01:36:04 -0700 |
| commit | 4f317c7e3d2a9e639ccb53ca9debe0c3981c6321 (patch) | |
| tree | 8e6c23728afd3559c4fce7b80da55ec5e288327d /weed/storage/needle.go | |
| parent | 0b99557c293f58efa0329d362a65bef1fdca0531 (diff) | |
| download | seaweedfs-4f317c7e3d2a9e639ccb53ca9debe0c3981c6321.tar.xz seaweedfs-4f317c7e3d2a9e639ccb53ca9debe0c3981c6321.zip | |
working version3
Diffstat (limited to 'weed/storage/needle.go')
| -rw-r--r-- | weed/storage/needle.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/weed/storage/needle.go b/weed/storage/needle.go index 31bada091..03a5e0a38 100644 --- a/weed/storage/needle.go +++ b/weed/storage/needle.go @@ -29,18 +29,19 @@ type Needle struct { DataSize uint32 `comment:"Data size"` //version2 Data []byte `comment:"The actual file data"` - Flags byte `comment:"boolean flags"` //version2 - NameSize uint8 //version2 + Flags byte `comment:"boolean flags"` //version2 + NameSize uint8 //version2 Name []byte `comment:"maximum 256 characters"` //version2 - MimeSize uint8 //version2 + MimeSize uint8 //version2 Mime []byte `comment:"maximum 256 characters"` //version2 - PairsSize uint16 //version2 + PairsSize uint16 //version2 Pairs []byte `comment:"additional name value pairs, json format, maximum 64kB"` LastModified uint64 //only store LastModifiedBytesLength bytes, which is 5 bytes to disk Ttl *TTL - Checksum CRC `comment:"CRC32 to check integrity"` - Padding []byte `comment:"Aligned to 8 bytes"` + Checksum CRC `comment:"CRC32 to check integrity"` + AppendAtNs uint64 `comment:"append timestamp in nano seconds"` //version3 + Padding []byte `comment:"Aligned to 8 bytes"` } func (n *Needle) String() (str string) { @@ -134,7 +135,7 @@ func NewNeedle(r *http.Request, fixJpgOrientation bool) (n *Needle, e error) { dotSep := strings.LastIndex(r.URL.Path, ".") fid := r.URL.Path[commaSep+1:] if dotSep > 0 { - fid = r.URL.Path[commaSep+1 : dotSep] + fid = r.URL.Path[commaSep+1: dotSep] } e = n.ParsePath(fid) |
