Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Seaweed ¶
type Seaweed struct { // Connection URI for the master. Master string // Volume cache to use if CacheVolumes is true. VolumeCache *VolumeCache // Lookup timeout for fetching volumes from master. LookupTimeout time.Duration }
Seaweed allows for retrieving files from a SeaweedFS cluster.
type VolumeCache ¶
VolumeCache stores a volume ID => volume URL map used for caching volume lookup responses from the master of a SeaweedFS cluster.
func (*VolumeCache) Add ¶
func (v *VolumeCache) Add(id uint32, urls []string)
Add adds a volume ID => location URL slice mapping to the volume cache.
func (*VolumeCache) Empty ¶
func (v *VolumeCache) Empty()
Empty clears all data and returns the VolumeCache to it's initial state.
func (*VolumeCache) Get ¶
func (v *VolumeCache) Get(id uint32) []string
Get returns all volume server URLs for a given volume ID.
func (*VolumeCache) GetNext ¶
func (v *VolumeCache) GetNext(id uint32) string
GetNext returns the n+1th location URL for the given volume ID, n is tracked internally.
func (*VolumeCache) Remove ¶
func (v *VolumeCache) Remove(id uint32)
Remove removes a volume from the volume cache.
Click to show internal directories.
Click to hide internal directories.