Documentation ¶
Index ¶
- Variables
- type JobSharder
- type List
- func (l *List) ApplyPollResults(m PerTenant, c PerTenantCompacted)
- func (l *List) CompactedMetas(tenantID string) []*backend.CompactedBlockMeta
- func (l *List) Metas(tenantID string) []*backend.BlockMeta
- func (l *List) Tenants() []string
- func (l *List) Update(tenantID string, add []*backend.BlockMeta, remove []*backend.BlockMeta, ...)
- type PerTenant
- type PerTenantCompacted
- type Poller
- type PollerConfig
Constants ¶
This section is empty.
Variables ¶
var OwnsNothingSharder = ownsNothingSharder{}
OwnsNothingSharder owns nothing. You do not want this developer on your team.
Functions ¶
This section is empty.
Types ¶
type JobSharder ¶
type JobSharder interface { // Owns is used to ask if a job, identified by a string, is owned by this process Owns(string) bool }
JobSharder is used to determine if a particular job is owned by this process
type List ¶
type List struct {
// contains filtered or unexported fields
}
List controls access to a per tenant blocklist and compacted blocklist
func (*List) ApplyPollResults ¶
func (l *List) ApplyPollResults(m PerTenant, c PerTenantCompacted)
ApplyPollResults applies the PerTenant and PerTenantCompacted maps to this blocklist Note that it also applies any known local changes and then wipes them out to be restored in the next polling cycle.
func (*List) CompactedMetas ¶
func (l *List) CompactedMetas(tenantID string) []*backend.CompactedBlockMeta
func (*List) Tenants ¶
Tenants returns a slice of tenant ids with metas (compacted metas are ignored.)
func (*List) Update ¶
func (l *List) Update(tenantID string, add []*backend.BlockMeta, remove []*backend.BlockMeta, compactedAdd []*backend.CompactedBlockMeta, compactedRemove []*backend.CompactedBlockMeta)
Update Adds and removes regular or compacted blocks from the in-memory blocklist. Changes are temporary and will be preserved only for one poll
type PerTenantCompacted ¶
type PerTenantCompacted map[string][]*backend.CompactedBlockMeta
PerTenantCompacted is a map of tenant ids to backend.CompactedBlockMetas
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
Poller retrieves the blocklist