ingestor

package
v0.74.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 20 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 string `validate:"required,uuid"`
	Events   []*CreateEventOpts
}

type CreateEventOpts added in v0.73.111

type CreateEventOpts struct {
	// (required) the tenant id
	TenantId string `validate:"required,uuid"`

	// (required) the event key
	Key string `validate:"required"`

	// (optional) the event data
	Data []byte

	// (optional) the event that this event is replaying
	ReplayedEvent *string `validate:"omitempty,uuid"`

	// (optional) the event metadata
	AdditionalMetadata []byte

	// (optional) the event priority
	Priority *int32 `validate:"omitempty,min=1,max=3"`

	// (optional) the event scope
	Scope *string `validate:"omitempty"`

	// (optional) the triggering webhook name
	TriggeringWebhookName *string `validate:"omitempty"`
}

type EventResult

type EventResult struct {
	TenantId           string
	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, errorText string, source sqlcv1.V1CelEvaluationFailureSource) 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) IngestCELEvaluationFailure added in v0.70.0

func (i *IngestorImpl) IngestCELEvaluationFailure(ctx context.Context, tenantId, 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 WithLogIngestionEnabled

func WithLogIngestionEnabled(isEnabled bool) IngestorOptFunc

func WithMessageQueueV1

func WithMessageQueueV1(mq msgqueue.MessageQueue) 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