consumer

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RingKey           = "dataobj-consumer"
	RingName          = "dataobj-consumer"
	PartitionRingKey  = "dataobj-consumer-partitions-key"
	PartitionRingName = "dataobj-consumer-partitions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	logsobj.BuilderConfig
	LifecyclerConfig    ring.LifecyclerConfig   `yaml:"lifecycler,omitempty"`
	PartitionRingConfig partitionring.Config    `yaml:"partition_ring" category:"experimental"`
	UploaderConfig      dataobj_uploader.Config `yaml:"uploader"`
	IdleFlushTimeout    time.Duration           `yaml:"idle_flush_timeout"`
	MaxBuilderAge       time.Duration           `yaml:"max_builder_age"`

	// This is temporary until we move to kafkav2.
	Topic string `yaml:"topic"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type Service

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

func New

func New(kafkaCfg kafka.Config, cfg Config, mCfg metastore.Config, bucket objstore.Bucket, scratchStore scratch.Store, _ string, _ ring.PartitionRingReader, reg prometheus.Registerer, logger log.Logger) (*Service, error)

func (*Service) Flush added in v3.7.0

func (s *Service) Flush()

Flush implements the ring.FlushTransferer interface.

func (*Service) PrepareDelayedDownscaleHandler added in v3.7.0

func (s *Service) PrepareDelayedDownscaleHandler(w http.ResponseWriter, r *http.Request)

PrepareDelayedDownscaleHandler is a special handler called by the rollout operator to prepare for a delayed downscale. This allows the service to perform any number of actions in preparation of being scaled down at the end of the delayed downscale window.

A delayed downscale is prepared via a POST request to this handler. The handler prepares the service to be downscaled and responds with the number of seconds since it first prepared for the delayed downscale. The handler should be idempotent if it has previously prepared for a delayed downscale.

A delayed downscale can also be canceled via a DELETE request to the same handler. The handler restores the service to its running state and then responds with a zero timestamp. The handler should be idempotent if it has previously canceled a delayed downscale.

func (*Service) PrepareDownscaleHandler added in v3.7.0

func (s *Service) PrepareDownscaleHandler(w http.ResponseWriter, r *http.Request)

PrepareDownscaleHandler is a special handler called by the rollout operator immediately before the pod is downscaled. It can stop a downscale by responding with a non 2xx status code.

func (*Service) TransferOut added in v3.7.0

func (s *Service) TransferOut(_ context.Context) error

TransferOut implements the ring.FlushTransferer interface.

Directories

Path Synopsis
Package logsobj provides tooling for creating logs-oriented data objects.
Package logsobj provides tooling for creating logs-oriented data objects.

Jump to

Keyboard shortcuts

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