Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type STANTriggerConn ¶
type STANTriggerConn struct { *stanbase.STANConnection // contains filtered or unexported fields }
func NewSTANTriggerConn ¶
func NewSTANTriggerConn(conn *stanbase.STANConnection, sensorName string, triggerName string, dependencyExpression string, deps []eventbuscommon.Dependency) *STANTriggerConn
func (*STANTriggerConn) Close ¶ added in v1.9.0
func (conn *STANTriggerConn) Close() error
func (*STANTriggerConn) IsClosed ¶ added in v1.9.0
func (conn *STANTriggerConn) IsClosed() bool
func (*STANTriggerConn) String ¶
func (n *STANTriggerConn) String() string
func (*STANTriggerConn) Subscribe ¶
func (n *STANTriggerConn) Subscribe( ctx context.Context, closeCh <-chan struct{}, resetConditionsCh <-chan struct{}, lastResetTime time.Time, transform func(depName string, event cloudevents.Event) (*cloudevents.Event, error), filter func(string, cloudevents.Event) bool, action func(map[string]cloudevents.Event), defaultSubject *string) error
Subscribe is used to subscribe to multiple event source dependencies Parameter - ctx, context Parameter - conn, eventbus connection Parameter - group, queue group name Parameter - closeCh, channel to indicate to close the subscription Parameter - resetConditionsCh, channel to indicate to reset trigger conditions Parameter - lastResetTime, the last time reset would have occurred, if any Parameter - dependencyExpr, example: "(dep1 || dep2) && dep3" Parameter - dependencies, array of dependencies information Parameter - filter, a function used to filter the message Parameter - action, a function to be triggered after all conditions meet
type SensorSTAN ¶
func NewSensorSTAN ¶
func NewSensorSTAN(url, clusterID, sensorName string, auth *eventbuscommon.Auth, logger *zap.SugaredLogger) *SensorSTAN
func (*SensorSTAN) Connect ¶
func (n *SensorSTAN) Connect(ctx context.Context, triggerName string, dependencyExpression string, deps []eventbuscommon.Dependency, atLeastOnce bool) (eventbuscommon.TriggerConnection, error)
func (*SensorSTAN) Initialize ¶
func (n *SensorSTAN) Initialize() error