Documentation ¶
Index ¶
- Variables
- func DeleteSubscription(conn pg.Conn, id eventline.Id) error
- func NextDay(now time.Time, h, m, s int) time.Time
- func NextHour(now time.Time, m, s int) time.Time
- func NextWeekDay(now time.Time, day WeekDay, h, m, s int) time.Time
- func TickEventDef() *eventline.EventDef
- type Connector
- func (c *Connector) DefaultCfg() eventline.ConnectorCfg
- func (c *Connector) Definition() *eventline.ConnectorDef
- func (c *Connector) Init(ccfg eventline.ConnectorCfg, initData eventline.ConnectorInitData) error
- func (c *Connector) Name() string
- func (c *Connector) Subscribe(conn pg.Conn, sctx *eventline.SubscriptionContext) error
- func (c *Connector) Terminate()
- func (c *Connector) Unsubscribe(conn pg.Conn, sctx *eventline.SubscriptionContext) error
- type ConnectorCfg
- type DailyParameters
- type HourlyParameters
- type OneshotParameters
- type Parameters
- type Subscription
- type TickEvent
- type WeekDay
- type WeeklyParameters
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var WeekDayValues = []WeekDay{ WeekDayMonday, WeekDayTuesday, WeekDayWednesday, WeekDayThursday, WeekDayFriday, WeekDaySaturday, WeekDaySunday, }
Functions ¶
func TickEventDef ¶
Types ¶
type Connector ¶
type Connector struct { Def *eventline.ConnectorDef Cfg *ConnectorCfg Log *dlog.Logger }
func NewConnector ¶
func NewConnector() *Connector
func (*Connector) DefaultCfg ¶
func (c *Connector) DefaultCfg() eventline.ConnectorCfg
func (*Connector) Definition ¶
func (c *Connector) Definition() *eventline.ConnectorDef
func (*Connector) Init ¶
func (c *Connector) Init(ccfg eventline.ConnectorCfg, initData eventline.ConnectorInitData) error
func (*Connector) Unsubscribe ¶
type ConnectorCfg ¶
type ConnectorCfg struct {
Secret string `json:"secret"`
}
func (*ConnectorCfg) Check ¶
func (cfg *ConnectorCfg) Check(c *check.Checker)
type DailyParameters ¶
type DailyParameters struct { Hour int `json:"hour,omitempty"` Minute int `json:"minute,omitempty"` Second int `json:"second,omitempty"` }
func (*DailyParameters) Check ¶
func (p *DailyParameters) Check(c *check.Checker)
type HourlyParameters ¶
type HourlyParameters struct { Minute int `json:"minute,omitempty"` Second int `json:"second,omitempty"` }
func (*HourlyParameters) Check ¶
func (p *HourlyParameters) Check(c *check.Checker)
type OneshotParameters ¶
type Parameters ¶
type Parameters struct { Oneshot *OneshotParameters `json:"oneshot,omitempty"` Periodic *int `json:"periodic,omitempty"` // seconds Hourly *HourlyParameters `json:"hourly,omitempty"` Daily *DailyParameters `json:"daily,omitempty"` Weekly *WeeklyParameters `json:"weekly,omitempty"` }
func (*Parameters) Check ¶
func (p *Parameters) Check(c *check.Checker)
func (*Parameters) FirstTick ¶
func (p *Parameters) FirstTick() (tick time.Time)
type Subscription ¶
func LoadSubscriptionForProcessing ¶
func LoadSubscriptionForProcessing(conn pg.Conn) (*Subscription, *eventline.Subscription, error)
func (*Subscription) FromRow ¶
func (s *Subscription) FromRow(row pgx.Row) error
type WeeklyParameters ¶
Click to show internal directories.
Click to hide internal directories.