Documentation ¶
Index ¶
- func NewMercuryRemoteAggregator(codec datastreams.ReportCodec, allowedSigners [][]byte, ...) *mercuryRemoteAggregator
- type MercuryTriggerService
- func (o *MercuryTriggerService) Close() error
- func (o *MercuryTriggerService) HealthReport() map[string]error
- func (o *MercuryTriggerService) Name() string
- func (o *MercuryTriggerService) ProcessReport(reports []datastreams.FeedReport) error
- func (o *MercuryTriggerService) Ready() error
- func (o *MercuryTriggerService) RegisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error)
- func (o *MercuryTriggerService) SetMetaOverride(meta datastreams.Metadata)
- func (o *MercuryTriggerService) Start(ctx context.Context) error
- func (o *MercuryTriggerService) UnregisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) error
- func (o *MercuryTriggerService) ValidateConfig(config *values.Map) (*streams.TriggerConfig, error)
- type OnDemand
- func (o *OnDemand) FanOutEvent(ctx context.Context, response capabilities.TriggerResponse) error
- func (o *OnDemand) RegisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error)
- func (o *OnDemand) SendEvent(ctx context.Context, wid string, event capabilities.TriggerResponse) error
- func (o *OnDemand) UnregisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMercuryRemoteAggregator ¶
func NewMercuryRemoteAggregator(codec datastreams.ReportCodec, allowedSigners [][]byte, minRequiredSignatures int, lggr logger.Logger) *mercuryRemoteAggregator
This aggregator is used by TriggerSubscriber to aggregate trigger events from multiple remote nodes. NOTE: Once Mercury supports parallel composition (and thus guarantee identical sets of reports), this will be replaced by the default MODE aggregator.
Types ¶
type MercuryTriggerService ¶
type MercuryTriggerService struct { capabilities.CapabilityInfo // contains filtered or unexported fields }
This Trigger Service allows for the registration and deregistration of triggers. You can also send reports to the service.
func NewMercuryTriggerService ¶
func NewMercuryTriggerService(tickerResolutionMs int64, lggr logger.Logger) *MercuryTriggerService
Mercury Trigger will send events to each subscriber every MaxFrequencyMs (configurable per subscriber). Event generation happens whenever local unix time is a multiple of tickerResolutionMs. Therefore, all subscribers' MaxFrequencyMs values need to be a multiple of tickerResolutionMs.
func (*MercuryTriggerService) Close ¶
func (o *MercuryTriggerService) Close() error
func (*MercuryTriggerService) HealthReport ¶
func (o *MercuryTriggerService) HealthReport() map[string]error
func (*MercuryTriggerService) Name ¶
func (o *MercuryTriggerService) Name() string
func (*MercuryTriggerService) ProcessReport ¶
func (o *MercuryTriggerService) ProcessReport(reports []datastreams.FeedReport) error
func (*MercuryTriggerService) Ready ¶
func (o *MercuryTriggerService) Ready() error
func (*MercuryTriggerService) RegisterTrigger ¶
func (o *MercuryTriggerService) RegisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error)
func (*MercuryTriggerService) SetMetaOverride ¶
func (o *MercuryTriggerService) SetMetaOverride(meta datastreams.Metadata)
func (*MercuryTriggerService) Start ¶
func (o *MercuryTriggerService) Start(ctx context.Context) error
func (*MercuryTriggerService) UnregisterTrigger ¶
func (o *MercuryTriggerService) UnregisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) error
func (*MercuryTriggerService) ValidateConfig ¶
func (o *MercuryTriggerService) ValidateConfig(config *values.Map) (*streams.TriggerConfig, error)
type OnDemand ¶
type OnDemand struct { capabilities.Validator[onDemandTriggerConfig, any, capabilities.TriggerResponse] capabilities.CapabilityInfo // contains filtered or unexported fields }
func NewOnDemand ¶
NewOnDemand creates a new on-demand trigger. The sendChannelBufferSize should be sized to ensure each client has sufficient time to process events, once this buffer is full new events for the client will be dropped.
func (*OnDemand) FanOutEvent ¶
func (o *OnDemand) FanOutEvent(ctx context.Context, response capabilities.TriggerResponse) error
func (*OnDemand) RegisterTrigger ¶
func (o *OnDemand) RegisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error)
func (*OnDemand) SendEvent ¶
func (o *OnDemand) SendEvent(ctx context.Context, wid string, event capabilities.TriggerResponse) error
SendEvent sends an event to a specific workflowId. If the workflowId is not registered an error is returned.
func (*OnDemand) UnregisterTrigger ¶
func (o *OnDemand) UnregisterTrigger(ctx context.Context, req capabilities.TriggerRegistrationRequest) error