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.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error)
- func (o *MercuryTriggerService) Start(ctx context.Context) error
- func (o *MercuryTriggerService) UnregisterTrigger(ctx context.Context, req capabilities.CapabilityRequest) error
- type OnDemand
- func (o *OnDemand) FanOutEvent(ctx context.Context, response capabilities.CapabilityResponse) error
- func (o *OnDemand) RegisterTrigger(ctx context.Context, req capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error)
- func (o *OnDemand) SendEvent(ctx context.Context, wid string, event capabilities.CapabilityResponse) error
- func (o *OnDemand) UnregisterTrigger(ctx context.Context, req capabilities.CapabilityRequest) 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.Validator[config, inputs, capabilities.TriggerEvent] 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.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error)
func (*MercuryTriggerService) Start ¶
func (o *MercuryTriggerService) Start(ctx context.Context) error
func (*MercuryTriggerService) UnregisterTrigger ¶
func (o *MercuryTriggerService) UnregisterTrigger(ctx context.Context, req capabilities.CapabilityRequest) error
type OnDemand ¶
type OnDemand struct { capabilities.Validator[onDemandTriggerConfig, any, capabilities.CapabilityResponse] 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.CapabilityResponse) error
func (*OnDemand) RegisterTrigger ¶
func (o *OnDemand) RegisterTrigger(ctx context.Context, req capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error)
func (*OnDemand) SendEvent ¶
func (o *OnDemand) SendEvent(ctx context.Context, wid string, event capabilities.CapabilityResponse) 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.CapabilityRequest) error