Documentation
¶
Index ¶
- Constants
- func InitSchema(ctx context.Context, exec libdb.Exec, cfg Config) error
- type Config
- type CursorStore
- type Firing
- type FiringFilter
- type FiringStore
- func (s *FiringStore) BeginFiring(ctx context.Context, exec libdb.Exec, triggerName string, nid int64, ...) (bool, error)
- func (s *FiringStore) BeginFiringOnce(ctx context.Context, exec libdb.Exec, triggerName string, nid int64, ...) (bool, error)
- func (s *FiringStore) FinishFiring(ctx context.Context, exec libdb.Exec, triggerName string, nid int64, ...) error
- func (s *FiringStore) ListFirings(ctx context.Context, exec libdb.Exec, f FiringFilter) ([]Firing, error)
- func (s *FiringStore) ResetFiring(ctx context.Context, exec libdb.Exec, triggerName string, nid int64) (bool, error)
- func (s *FiringStore) StaleClaim() time.Duration
- type FiringStoreOption
- type Listener
- type ListenerStore
- func (s *ListenerStore) AppendListener(ctx context.Context, exec libdb.Exec, l *Listener) error
- func (s *ListenerStore) DeleteListener(ctx context.Context, exec libdb.Exec, id string) error
- func (s *ListenerStore) DeleteListenersByOwner(ctx context.Context, exec libdb.Exec, owner string) ([]string, error)
- func (s *ListenerStore) GetListener(ctx context.Context, exec libdb.Exec, id string) (*Listener, error)
- func (s *ListenerStore) ListListeners(ctx context.Context, exec libdb.Exec, afterCreatedAt time.Time, afterID string, ...) ([]*Listener, error)
- func (s *ListenerStore) ListListenersByType(ctx context.Context, exec libdb.Exec, eventType string) ([]*Listener, error)
- type StagedEvent
- type StagingStore
- func (s *StagingStore) AppendStagedEvent(ctx context.Context, exec libdb.Exec, e *StagedEvent) error
- func (s *StagingStore) DeleteStagedEvents(ctx context.Context, exec libdb.Exec, ids ...string) error
- func (s *StagingStore) ListDueStagedEvents(ctx context.Context, exec libdb.Exec, now time.Time, limit int) ([]*StagedEvent, error)
Constants ¶
View Source
const ( FiringStatusRunning = "running" FiringStatusOK = "ok" FiringStatusError = "error" FiringStatusRefused = "refused" )
View Source
const ( DefaultFiringLimit = 50 MaxFiringLimit = 1000 )
View Source
const ( ListenerKindStart = "start" ListenerKindWake = "wake" )
View Source
const ( DefaultListenerLimit = 50 MaxListenerLimit = 1000 )
View Source
const ( DefaultStagingLimit = 100 MaxStagingLimit = 1000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CursorStore ¶
type CursorStore struct {
// contains filtered or unexported fields
}
func NewCursorStore ¶
func NewCursorStore(cfg Config, scope string) (*CursorStore, error)
type Firing ¶
type FiringFilter ¶
type FiringStore ¶
type FiringStore struct {
// contains filtered or unexported fields
}
func NewFiringStore ¶
func NewFiringStore(cfg Config, scope string, staleClaim time.Duration, opts ...FiringStoreOption) (*FiringStore, error)
func (*FiringStore) BeginFiring ¶
func (*FiringStore) BeginFiringOnce ¶
func (*FiringStore) FinishFiring ¶
func (*FiringStore) ListFirings ¶
func (s *FiringStore) ListFirings(ctx context.Context, exec libdb.Exec, f FiringFilter) ([]Firing, error)
func (*FiringStore) ResetFiring ¶
func (*FiringStore) StaleClaim ¶
func (s *FiringStore) StaleClaim() time.Duration
type FiringStoreOption ¶
type FiringStoreOption func(*FiringStore)
func WithClock ¶
func WithClock(now func() time.Time) FiringStoreOption
type ListenerStore ¶
type ListenerStore struct {
// contains filtered or unexported fields
}
func NewListenerStore ¶
func NewListenerStore(cfg Config, scope string) (*ListenerStore, error)
func (*ListenerStore) AppendListener ¶
func (*ListenerStore) DeleteListener ¶
func (*ListenerStore) DeleteListenersByOwner ¶
func (*ListenerStore) GetListener ¶
func (*ListenerStore) ListListeners ¶
func (*ListenerStore) ListListenersByType ¶
type StagedEvent ¶
type StagingStore ¶
type StagingStore struct {
// contains filtered or unexported fields
}
func NewStagingStore ¶
func NewStagingStore(cfg Config, scope string) (*StagingStore, error)
func (*StagingStore) AppendStagedEvent ¶
func (s *StagingStore) AppendStagedEvent(ctx context.Context, exec libdb.Exec, e *StagedEvent) error
func (*StagingStore) DeleteStagedEvents ¶
func (*StagingStore) ListDueStagedEvents ¶
func (s *StagingStore) ListDueStagedEvents(ctx context.Context, exec libdb.Exec, now time.Time, limit int) ([]*StagedEvent, error)
Click to show internal directories.
Click to hide internal directories.