Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload interface { Tenant() int64 Metrics() []prompb.TimeSeries Streams() []logproto.Stream }
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisher(tm *TenantManager, publishCh <-chan Payload, logger zerolog.Logger, promRegisterer prometheus.Registerer) *Publisher
type TenantManager ¶ added in v0.0.18
type TenantManager struct {
// contains filtered or unexported fields
}
func NewTenantManager ¶ added in v0.0.18
func NewTenantManager(ctx context.Context, tenantsClient sm.TenantsClient, tenantCh <-chan sm.Tenant, timeout time.Duration) *TenantManager
NewTenantManager creates a new tenant manager that is able to retrieve tenants from the remote API using the specified tenantsClient or receive them over the provided tenantCh channel. It will keep them for a duration no longer than `timeout`.
A new goroutine is started which stops when the provided context is cancelled.
func (*TenantManager) GetTenant ¶ added in v0.0.18
func (tm *TenantManager) GetTenant(ctx context.Context, req *sm.TenantInfo) (*sm.Tenant, error)
GetTenant retrieves the tenant specified by `req`, either from a local cache or by making a request to the API.
Click to show internal directories.
Click to hide internal directories.