ingestor

package
v0.79.39 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkCreateEventOpts added in v0.73.111

type BulkCreateEventOpts struct {
	TenantId uuid.UUID `validate:"required"`
	Events   []*CreateEventOpts
}

type CreateEventOpts added in v0.73.111

type CreateEventOpts struct {
	ReplayedEvent         *uuid.UUID `validate:"omitempty"`
	Priority              *int32     `validate:"omitempty,min=1,max=3"`
	Scope                 *string    `validate:"omitempty"`
	TriggeringWebhookName *string    `validate:"omitempty"`
	TenantId              uuid.UUID  `validate:"required"`
	Key                   string     `validate:"required"`
	Data                  []byte
	AdditionalMetadata    []byte
}

type EventResult

type EventResult struct {
	TenantId           uuid.UUID
	EventId            string
	EventKey           string
	Data               string
	AdditionalMetadata string
}

type Ingestor

type Ingestor interface {
	contracts.EventsServiceServer
	IngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, eventName string, data []byte, metadata []byte, priority *int32, scope, triggeringWebhookName *string) (*sqlcv1.Event, error)
	IngestWebhookValidationFailure(ctx context.Context, tenant *sqlcv1.Tenant, webhookName, errorText string) error
	BulkIngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, eventOpts []*CreateEventOpts) ([]*sqlcv1.Event, error)
	IngestReplayedEvent(ctx context.Context, tenant *sqlcv1.Tenant, replayedEvent *sqlcv1.Event) (*sqlcv1.Event, error)
	IngestCELEvaluationFailure(ctx context.Context, tenantId uuid.UUID, errorText string, source sqlcv1.V1CelEvaluationFailureSource) error
	Cleanup() error
}

func NewIngestor

func NewIngestor(fs ...IngestorOptFunc) (Ingestor, error)

type IngestorImpl

type IngestorImpl struct {
	contracts.UnimplementedEventsServiceServer
	// contains filtered or unexported fields
}

func (*IngestorImpl) BulkIngestEvent

func (i *IngestorImpl) BulkIngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, eventOpts []*CreateEventOpts) ([]*sqlcv1.Event, error)

func (*IngestorImpl) BulkPush

func (*IngestorImpl) Cleanup added in v0.78.0

func (i *IngestorImpl) Cleanup() error

Cleanup stops the pubBuffer goroutines if they exist

func (*IngestorImpl) IngestCELEvaluationFailure added in v0.70.0

func (i *IngestorImpl) IngestCELEvaluationFailure(ctx context.Context, tenantId uuid.UUID, errorText string, source sqlcv1.V1CelEvaluationFailureSource) error

func (*IngestorImpl) IngestEvent

func (i *IngestorImpl) IngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, key string, data []byte, metadata []byte, priority *int32, scope, triggeringWebhookName *string) (*sqlcv1.Event, error)

func (*IngestorImpl) IngestReplayedEvent

func (i *IngestorImpl) IngestReplayedEvent(ctx context.Context, tenant *sqlcv1.Tenant, replayedEvent *sqlcv1.Event) (*sqlcv1.Event, error)

func (*IngestorImpl) IngestWebhookValidationFailure added in v0.70.0

func (i *IngestorImpl) IngestWebhookValidationFailure(ctx context.Context, tenant *sqlcv1.Tenant, webhookName, errorText string) error

func (*IngestorImpl) Push

func (*IngestorImpl) PutLog

func (*IngestorImpl) PutStreamEvent

func (*IngestorImpl) ReplaySingleEvent

func (i *IngestorImpl) ReplaySingleEvent(ctx context.Context, req *contracts.ReplayEventRequest) (*contracts.Event, error)

type IngestorOptFunc

type IngestorOptFunc func(*IngestorOpts)

func WithAnalytics added in v0.79.36

func WithAnalytics(a analytics.Analytics) IngestorOptFunc

func WithGrpcTriggerSlots added in v0.78.0

func WithGrpcTriggerSlots(slots int) IngestorOptFunc

func WithGrpcTriggersEnabled added in v0.78.0

func WithGrpcTriggersEnabled(enabled bool) IngestorOptFunc

func WithLocalDispatcher added in v0.78.0

func WithLocalDispatcher(d *dispatcher.DispatcherImpl) IngestorOptFunc

func WithLocalScheduler added in v0.78.0

func WithLocalScheduler(s *scheduler.Scheduler) IngestorOptFunc

func WithLogIngestionEnabled

func WithLogIngestionEnabled(isEnabled bool) IngestorOptFunc

func WithLogger added in v0.78.0

func WithLogger(l *zerolog.Logger) IngestorOptFunc

func WithMessageQueueV1

func WithMessageQueueV1(mq msgqueue.MessageQueue) IngestorOptFunc

func WithOptimisticSchedulingEnabled added in v0.78.0

func WithOptimisticSchedulingEnabled(enabled bool) IngestorOptFunc

func WithRepositoryV1

func WithRepositoryV1(r v1.Repository) IngestorOptFunc

type IngestorOpts

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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