eventingester

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceType = "event-ingester"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool `yaml:"enabled" default:"false"`
	// Outputs is the list of sinks to use.
	Outputs []output.Config `yaml:"outputs"`
	// Authorization is the authorization configuration.
	Authorization auth.AuthorizationConfig `yaml:"authorization"`
	// ClientNameSalt is the salt to use for computing client names
	ClientNameSalt string `yaml:"clientNameSalt"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(log observability.ContextualLogger, clockDrift *time.Duration, geoipProvider geoip.Provider, cache store.Cache, clientNameSalt string) *Handler

func (*Handler) Events

func (h *Handler) Events(ctx context.Context, events []*xatu.DecoratedEvent, user *auth.User, group *auth.Group) ([]*xatu.DecoratedEvent, error)

type Ingester

type Ingester struct {
	xatu.UnimplementedEventIngesterServer
	// contains filtered or unexported fields
}

func NewIngester

func NewIngester(
	ctx context.Context,
	log observability.ContextualLogger, conf *Config,
	clockDrift *time.Duration,
	geoipProvider geoip.Provider,
	cache store.Cache,
	healthServer *health.Server,
) (*Ingester, error)

func (*Ingester) CreateEvents

func (*Ingester) Name added in v1.0.38

func (e *Ingester) Name() string

Name returns the name of this service

func (*Ingester) Start

func (e *Ingester) Start(ctx context.Context, grpcServer *grpc.Server) error

func (*Ingester) Stop

func (e *Ingester) Stop(ctx context.Context) error

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddDecoratedEventFromUserReceived added in v0.0.202

func (m *Metrics) AddDecoratedEventFromUserReceived(count int, user, group string)

func (*Metrics) AddDecoratedEventReceived

func (m *Metrics) AddDecoratedEventReceived(count int, event, sentryID string)

type Pipeline added in v1.8.8

type Pipeline struct {
	// contains filtered or unexported fields
}

Pipeline manages the shared event processing infrastructure used by different transport layers (gRPC, HTTP) to ingest events.

func NewPipeline added in v1.8.8

func NewPipeline(
	ctx context.Context,
	log observability.ContextualLogger, config *Config,
	clockDrift *time.Duration,
	geoipProvider geoip.Provider,
	cache store.Cache,
) (*Pipeline, error)

NewPipeline creates a new event processing pipeline.

func (*Pipeline) Auth added in v1.8.8

func (p *Pipeline) Auth() *auth.Authorization

Auth returns the authorization component.

func (*Pipeline) AuthEnabled added in v1.8.8

func (p *Pipeline) AuthEnabled() bool

AuthEnabled returns whether authorization is enabled.

func (*Pipeline) Handler added in v1.8.8

func (p *Pipeline) Handler() *Handler

Handler returns the event handler.

func (*Pipeline) ProcessAndSend added in v1.8.8

func (p *Pipeline) ProcessAndSend(
	ctx context.Context,
	events []*xatu.DecoratedEvent,
	user *auth.User,
	group *auth.Group,
	spanPrefix string,
) (uint64, error)

ProcessAndSend processes events through the handler and sends to all sinks. Returns the number of events that were processed and sent.

func (*Pipeline) Start added in v1.8.8

func (p *Pipeline) Start(ctx context.Context) error

Start starts the pipeline components (auth and sinks).

func (*Pipeline) Stop added in v1.8.8

func (p *Pipeline) Stop(ctx context.Context) error

Stop stops all sinks.

Jump to

Keyboard shortcuts

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