Documentation ¶
Index ¶
- Constants
- Variables
- func FileKey(vid, nid uint64) string
- func NeedleKey(vid, nid uint64) string
- type NeedleCache
- type Size
- type Store
- func (s *Store) AddVolume(w http.ResponseWriter, r *http.Request)
- func (store *Store) Close()
- func (s *Store) Del(w http.ResponseWriter, r *http.Request)
- func (s *Store) Get(w http.ResponseWriter, r *http.Request)
- func (store *Store) HeartBeat()
- func (s *Store) Put(w http.ResponseWriter, r *http.Request)
- func (store *Store) Start()
Constants ¶
View Source
const HeartBeatInterval time.Duration = time.Second * 5
per 5 secs the store server send a heartbeat http request to master
Variables ¶
View Source
var MaxDiskUsedPercent uint = 90
Functions ¶
Types ¶
type NeedleCache ¶
type NeedleCache struct {
// contains filtered or unexported fields
}
func (*NeedleCache) DelNeedle ¶
func (n *NeedleCache) DelNeedle(vid, nid uint64) (err error)
DelMeta del meta from cache.
type Store ¶
type Store struct { Volumes map[uint64]*volume.Volume NeedleLock sync.RWMutex StoreDir string //Store对应的目录,该目录下存放着各个Volume File //get/upload/delete file ApiServer *http.ServeMux ApiHost string ApiPort int // each store server connects to a master server MasterHost string MasterPort int Directory *volume.LeveldbDirectory Cache *NeedleCache }
one store contains several volumes
Click to show internal directories.
Click to hide internal directories.