Documentation ¶
Overview ¶
Package timekey implements a customized Fid to get/set time/mime/size info in fid for seaweedfs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fid ¶
type Fid struct { Id uint32 // volume id Key uint64 // file key for volume Cookie uint32 // cookie }
func (*Fid) InsertCookie ¶
Set Fid.Cookie(32 bits) according to the file infomation Fid.Cookie contains the mime type info and file size(in KB) midx takes the left 10 bits mask: 0xffc00000 size tekes the rigth 22 bits mask: 0x003fffff
func (*Fid) InsertKeyAndCookie ¶
func (*Fid) InsertTimeKey ¶
func (f *Fid) InsertTimeKey()
Set Fid.Key to current nano seconds since 1970's which is monotonouse increased :) Let's hope this key would not collides with each other
Click to show internal directories.
Click to hide internal directories.