Documentation
¶
Index ¶
- type BulkCreateEventOpts
- type CreateEventOpts
- type EventResult
- type Ingestor
- type IngestorImpl
- func (i *IngestorImpl) BulkIngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, eventOpts []*CreateEventOpts) ([]*sqlcv1.Event, error)
- func (i *IngestorImpl) BulkPush(ctx context.Context, req *contracts.BulkPushEventRequest) (*contracts.Events, error)
- func (i *IngestorImpl) Cleanup() error
- func (i *IngestorImpl) IngestCELEvaluationFailure(ctx context.Context, tenantId uuid.UUID, errorText string, ...) error
- func (i *IngestorImpl) IngestEvent(ctx context.Context, tenant *sqlcv1.Tenant, key string, data []byte, ...) (*sqlcv1.Event, error)
- func (i *IngestorImpl) IngestReplayedEvent(ctx context.Context, tenant *sqlcv1.Tenant, replayedEvent *sqlcv1.Event) (*sqlcv1.Event, error)
- func (i *IngestorImpl) IngestWebhookValidationFailure(ctx context.Context, tenant *sqlcv1.Tenant, webhookName, errorText string) error
- func (i *IngestorImpl) Push(ctx context.Context, req *contracts.PushEventRequest) (*contracts.Event, error)
- func (i *IngestorImpl) PutLog(ctx context.Context, req *contracts.PutLogRequest) (*contracts.PutLogResponse, error)
- func (i *IngestorImpl) PutStreamEvent(ctx context.Context, req *contracts.PutStreamEventRequest) (*contracts.PutStreamEventResponse, error)
- func (i *IngestorImpl) ReplaySingleEvent(ctx context.Context, req *contracts.ReplayEventRequest) (*contracts.Event, error)
- type IngestorOptFunc
- func WithGrpcTriggerSlots(slots int) IngestorOptFunc
- func WithGrpcTriggersEnabled(enabled bool) IngestorOptFunc
- func WithLocalDispatcher(d *dispatcher.DispatcherImpl) IngestorOptFunc
- func WithLocalScheduler(s *scheduler.Scheduler) IngestorOptFunc
- func WithLogIngestionEnabled(isEnabled bool) IngestorOptFunc
- func WithLogger(l *zerolog.Logger) IngestorOptFunc
- func WithMessageQueueV1(mq msgqueue.MessageQueue) IngestorOptFunc
- func WithOptimisticSchedulingEnabled(enabled bool) IngestorOptFunc
- func WithRepositoryV1(r v1.Repository) IngestorOptFunc
- type IngestorOpts
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 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 (i *IngestorImpl) BulkPush(ctx context.Context, req *contracts.BulkPushEventRequest) (*contracts.Events, error)
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 (*IngestorImpl) IngestReplayedEvent ¶
func (*IngestorImpl) IngestWebhookValidationFailure ¶ added in v0.70.0
func (*IngestorImpl) Push ¶
func (i *IngestorImpl) Push(ctx context.Context, req *contracts.PushEventRequest) (*contracts.Event, error)
func (*IngestorImpl) PutLog ¶
func (i *IngestorImpl) PutLog(ctx context.Context, req *contracts.PutLogRequest) (*contracts.PutLogResponse, error)
func (*IngestorImpl) PutStreamEvent ¶
func (i *IngestorImpl) PutStreamEvent(ctx context.Context, req *contracts.PutStreamEventRequest) (*contracts.PutStreamEventResponse, error)
func (*IngestorImpl) ReplaySingleEvent ¶
func (i *IngestorImpl) ReplaySingleEvent(ctx context.Context, req *contracts.ReplayEventRequest) (*contracts.Event, error)
type IngestorOptFunc ¶
type IngestorOptFunc func(*IngestorOpts)
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
}
Click to show internal directories.
Click to hide internal directories.