Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheClient ¶
type CacheClient interface { Del(keys ...string) error HSet(key string, field string, value string) error HGet(key string, field string) (*string, error) HDel(key string, fields ...string) error HGetAll(key string) (map[string]string, error) HMSet(key string, values map[string]string) error Pipeline(commands []radix.CmdAction) error Get(key string) (*string, error) Set(key string, value string) error Do(cmd radix.CmdAction) error }
func NewCacheClusterClient ¶
func NewCacheClusterClient(addresses []string, password string, timeout uint64) (CacheClient, error)
func NewCacheStandaloneClient ¶
func NewCacheStandaloneClient(address string, password string, timeout uint64) (CacheClient, error)
type Clusters ¶
type Clusters interface { RegisterCluster(cluster *common.Cluster) error UnregisterCluster(clusterId string, clusterHandler func(cluster *common.Cluster) error) error RegisterNodeTo(clusterId string, node *common.Node) error UnregisterNode(nodeId string, syncHandler func(cluster *common.Cluster) error, unregisteredNodeHandler func(deletingNode *common.Node) error, masterChangedHandler func(newMaster *common.Node) error) error Get(clusterId string) (*common.Cluster, error) GetByNodeId(nodeId string) (*common.Cluster, error) GetAll() (common.Clusters, error) Save(clusterId string, saveHandler func(cluster *common.Cluster) error) error SaveAll(saveAllHandler func(clusters common.Clusters) error) error SetNewMaster(clusterId string, nodeId string) error UpdateMaintain(clusterId string, maintain bool, topic common.Topics) error UpdateState(clusterId string, state common.States) error UpdateStateWithMaintain(clusterId string, state common.States, maintain bool, topic common.Topics) error UpdateNodes(cluster *common.Cluster) error ResetStats(cluster *common.Cluster) error }
func NewClusters ¶
func NewClusters(conn *Connection, database string, mutex mutex.LockingCenter) (Clusters, error)
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(connectionString string, transaction bool) (*Connection, error)
type Index ¶
type Index interface { WaitQueueCompletion() QueueUpsert(item *common.CacheFileItem, syncTime *time.Time) QueueDrop(clusterId string, sha512Hex string) QueueUpsertChunkNode(sha512Hex string, nodeId string) QueueUpsertUsageInMap(clusterId string, items common.SyncFileItemList) Get(sha512Hex string) (*common.CacheFileItem, error) PullMap(clusterId string) (map[string]string, error) CompareMap(clusterId string, items common.SyncFileItemMap) bool }
type Metadata ¶
type Metadata interface { Cursor(folderHandler func(folder *common.Folder) (bool, error), parallelSize uint8) error LockTree(folderHandler func(folders []*common.Folder) ([]*common.Folder, error)) error Lock() Unlock() }
func NewMetadata ¶
func NewMetadata(mutex mutex.LockingCenter, conn *Connection, database string) (Metadata, error)
type Operation ¶
type Operation interface { RepairDetail() (RepairDetail, error) SetRepairing(repairing bool, completed bool) error }
func NewOperation ¶
func NewOperation(client CacheClient, keyPrefix string) Operation
type RepairDetail ¶
Click to show internal directories.
Click to hide internal directories.