Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterStores ¶
type ClusterStores struct { Working StoreSlice Expired StoreSlice }
ClusterStores collects stores by their status.
func NewClusterStores ¶
func NewClusterStores() *ClusterStores
func (*ClusterStores) ExpiredStores ¶
func (cs *ClusterStores) ExpiredStores() StoreSlice
ExpiredStores returns all recorded expired stores. NB: the returned order isn't deterministic.
func (*ClusterStores) RegisterExpired ¶
func (cs *ClusterStores) RegisterExpired(store *Store)
RegisterExpired collects expired stores.
func (*ClusterStores) RegisterWorking ¶
func (cs *ClusterStores) RegisterWorking(store *Store)
RegisterWorking collects working stores.
func (*ClusterStores) WorkingStores ¶
func (cs *ClusterStores) WorkingStores() StoreSlice
WorkingStores returns all recorded working stores. NB: the returned order isn't deterministic.
type ExcludedFilter ¶
type ExcludedFilter struct {
// contains filtered or unexported fields
}
func NewExcludedFilter ¶
func NewExcludedFilter(stores ...string) *ExcludedFilter
func (*ExcludedFilter) Filter ¶
func (e *ExcludedFilter) Filter(store *Store) bool
type IDAllocator ¶
type IDAllocator interface { // Next returns `false` when IDAllocator was exhausted temporarily. Next() (uint64, bool) }
IDAllocator is used to fetch new replica ID.
type Store ¶
Store records metadata for tn store.
func FilterStore ¶
FilterStore filters store according to Filters
type StoreSlice ¶
type StoreSlice []*Store
func (StoreSlice) Contains ¶
func (ss StoreSlice) Contains(storeID string) bool
type TestIDAllocator ¶
type TestIDAllocator struct {
// contains filtered or unexported fields
}
func NewTestIDAllocator ¶
func NewTestIDAllocator(startFrom uint64) *TestIDAllocator
func (*TestIDAllocator) Next ¶
func (a *TestIDAllocator) Next() (uint64, bool)
Click to show internal directories.
Click to hide internal directories.