Documentation
¶
Index ¶
- Constants
- type Config
- type Handler
- type Ingester
- type Metrics
- type Pipeline
- func (p *Pipeline) Auth() *auth.Authorization
- func (p *Pipeline) AuthEnabled() bool
- func (p *Pipeline) Handler() *Handler
- func (p *Pipeline) ProcessAndSend(ctx context.Context, events []*xatu.DecoratedEvent, user *auth.User, ...) (uint64, error)
- func (p *Pipeline) Start(ctx context.Context) error
- func (p *Pipeline) Stop(ctx context.Context) error
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"`
}
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
type Ingester ¶
type Ingester struct {
xatu.UnimplementedEventIngesterServer
// contains filtered or unexported fields
}
func NewIngester ¶
func (*Ingester) CreateEvents ¶
func (e *Ingester) CreateEvents(ctx context.Context, req *xatu.CreateEventsRequest) (*xatu.CreateEventsResponse, error)
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) AddDecoratedEventFromUserReceived ¶ added in v0.0.202
func (*Metrics) AddDecoratedEventReceived ¶
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
AuthEnabled returns whether authorization is enabled.
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.
Click to show internal directories.
Click to hide internal directories.