Documentation
¶
Index ¶
Constants ¶
View Source
const ( RingName = "segment-writer" RingKey = "segment-writer-ring" )
Variables ¶
View Source
var ErrMetastoreDLQFailed = fmt.Errorf("failed to store block metadata in DLQ")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
GRPCClientConfig grpcclient.Config `yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the segment writer."`
LifecyclerConfig ring.LifecyclerConfig `yaml:"lifecycler,omitempty"`
SegmentDuration time.Duration `yaml:"segment_duration,omitempty" category:"advanced"`
FlushConcurrency uint `yaml:"flush_concurrency,omitempty" category:"advanced"`
Upload UploadConfig `yaml:"upload,omitempty" category:"advanced"`
}
func (*Config) RegisterFlags ¶
type Limits ¶ added in v1.9.0
type Limits interface {
IngestionRelabelingRules(tenantID string) []*relabel.Config
DistributorUsageGroups(tenantID string) *validation.UsageGroupConfig
}
type SegmentWriterService ¶
type SegmentWriterService struct {
services.Service
segmentwriterv1.UnimplementedSegmentWriterServiceServer
// contains filtered or unexported fields
}
func New ¶
func New( reg prometheus.Registerer, logger log.Logger, config Config, limits Limits, health health.Service, storageBucket phlareobj.Bucket, metastoreClient *metastoreclient.Client, ) (*SegmentWriterService, error)
func (*SegmentWriterService) CheckReady ¶
func (i *SegmentWriterService) CheckReady(ctx context.Context) error
CheckReady is used to indicate when the ingesters are ready for the addition removal of another ingester. Returns 204 when the ingester is ready, 500 otherwise.
func (*SegmentWriterService) Push ¶
func (i *SegmentWriterService) Push(ctx context.Context, req *segmentwriterv1.PushRequest) (*segmentwriterv1.PushResponse, error)
type UploadConfig ¶ added in v1.13.0
type UploadConfig struct {
Timeout time.Duration `yaml:"timeout,omitempty" category:"advanced"`
MaxRetries int `yaml:"retry_max_retries,omitempty" category:"advanced"`
MinBackoff time.Duration `yaml:"retry_min_period,omitempty" category:"advanced"`
MaxBackoff time.Duration `yaml:"retry_max_period,omitempty" category:"advanced"`
HedgeUploadAfter time.Duration `yaml:"hedge_upload_after,omitempty" category:"advanced"`
HedgeRateMax float64 `yaml:"hedge_rate_max,omitempty" category:"advanced"`
HedgeRateBurst uint `yaml:"hedge_rate_burst,omitempty" category:"advanced"`
}
func (*UploadConfig) RegisterFlagsWithPrefix ¶ added in v1.13.0
func (cfg *UploadConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
Click to show internal directories.
Click to hide internal directories.