generator

package
v3.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsNamespace = "loki_stream_generator_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NumPartitions             int           `yaml:"num_partitions"`
	NumTenants                int           `yaml:"num_tenants"`
	TenantPrefix              string        `yaml:"tenant_prefix"`
	QPSPerTenant              int           `yaml:"qps_per_tenant"`
	CreateBatchSize           int           `yaml:"create_batch_size"`
	CreateNewStreamsInterval  time.Duration `yaml:"create_new_streams_interval"`
	StreamsPerTenant          int           `yaml:"streams_per_tenant"`
	StreamLabels              []string      `yaml:"stream_labels"`
	MaxGlobalStreamsPerTenant int           `yaml:"max_global_streams_per_tenant"`
	PushMode                  PushModeType  `yaml:"push_mode"`

	// Stream size control parameter
	DesiredRate int `yaml:"desired_rate"`

	LogLevel       dskit_log.Level `yaml:"log_level,omitempty"`
	HTTPListenPort int             `yaml:"http_listen_port,omitempty"`

	// Memberlist config
	MemberlistKV memberlist.KVConfig `yaml:"memberlist,omitempty"`

	// Kafka config
	Kafka kafka.Config `yaml:"kafka,omitempty"`

	// Lifecycler config
	LifecyclerConfig ring.LifecyclerConfig `yaml:"lifecycler,omitempty"`

	// Client configs
	DistributorClientConfig distributor_client.Config `yaml:"distributor_client,omitempty"`
	FrontendClientConfig    frontend_client.Config    `yaml:"frontend_client,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger)

func (*Config) Validate

func (c *Config) Validate() error

type Generator

type Generator struct {
	services.Service
	// contains filtered or unexported fields
}

func New

func New(cfg Config, logger log.Logger, reg prometheus.Registerer) (*Generator, error)

func (*Generator) GetFrontendRing

func (s *Generator) GetFrontendRing() *ring.Ring

func (*Generator) GetMemberlist

func (s *Generator) GetMemberlist() *memberlist.KVInitService

type PushModeType

type PushModeType string
const (
	PushStreamMetadataOnly PushModeType = "stream-metadata"
	PushStream             PushModeType = "stream"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL