Documentation
¶
Index ¶
- func DiskvPathTransform(key string) []string
- type AllocRet
- type AllocVolsArgs
- type Allocator
- type BlobDelete
- type CacheDiskArgs
- type CacheVolumeArgs
- type Cacher
- type Client
- type Config
- type DeleteArgs
- type DiscardVolsArgs
- type LbConfig
- type LbMsgSender
- type ListVolsArgs
- type MsgSender
- type ShardRepairArgs
- type VersionVolume
- type VolumeList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiskvPathTransform ¶
DiskvPathTransform transform key to multi-level path. eg: key(with '{namespace}-{id}') --> ~/hash(key)[0:2]/hash(key)[2:4]/key
Types ¶
type AllocVolsArgs ¶
type Allocator ¶
type Allocator interface { VolumeAlloc(ctx context.Context, host string, args *AllocVolsArgs) (ret []AllocRet, err error) ListVolumes(ctx context.Context, host string, args *ListVolsArgs) (ret VolumeList, err error) }
type BlobDelete ¶
type CacheDiskArgs ¶
type CacheDiskArgs struct { DiskID proto.DiskID `json:"disk_id"` Flush bool `json:"flush,omitempty"` }
CacheDiskArgs disk arguments.
type CacheVolumeArgs ¶
type CacheVolumeArgs struct { Vid proto.Vid `json:"vid"` Version uint32 `json:"version,omitempty"` Flush bool `json:"flush,omitempty"` }
CacheVolumeArgs volume arguments.
type Cacher ¶
type Cacher interface { GetCacheVolume(ctx context.Context, host string, args *CacheVolumeArgs) (*VersionVolume, error) GetCacheDisk(ctx context.Context, host string, args *CacheDiskArgs) (*blobnode.DiskInfo, error) // Erase cache in proxy memory and diskv. // Volume key is "volume-{vid}", and disk key is "disk-{disk_id}". // Notice: Erase all if key is "ALL"! Erase(ctx context.Context, host string, key string) error }
Cacher interface of proxy cache.
type DeleteArgs ¶
type DeleteArgs struct { ClusterID proto.ClusterID `json:"cluster_id"` Blobs []BlobDelete `json:"blobs"` }
type DiscardVolsArgs ¶
type LbMsgSender ¶
type LbMsgSender interface { SendDeleteMsg(ctx context.Context, args *DeleteArgs) error SendShardRepairMsg(ctx context.Context, args *ShardRepairArgs) error }
func NewMQLbClient ¶
func NewMQLbClient(cfg *LbConfig, service clustermgr.APIService, clusterID proto.ClusterID) LbMsgSender
type ListVolsArgs ¶
type MsgSender ¶
type MsgSender interface { SendDeleteMsg(ctx context.Context, host string, args *DeleteArgs) error SendShardRepairMsg(ctx context.Context, host string, args *ShardRepairArgs) error }
type ShardRepairArgs ¶
type VersionVolume ¶
type VersionVolume struct { clustermgr.VolumeInfo Version uint32 `json:"version,omitempty"` }
VersionVolume volume with version.
func (*VersionVolume) GetVersion ¶
func (v *VersionVolume) GetVersion() uint32
GetVersion calculate version with volume's units.
type VolumeList ¶
type VolumeList struct { Vids []proto.Vid `json:"vids"` Volumes []clustermgr.AllocVolumeInfo `json:"volumes"` }
Click to show internal directories.
Click to hide internal directories.