Documentation
¶
Index ¶
- func WithNamePrefix(name string) syncOption
- func WithSubject(subject string) syncOption
- type Func
- type FuncsMap
- type Sync
- func (s *Sync) Continue(ctx context.Context) error
- func (s *Sync) IsLocked() bool
- func (s *Sync) Lock() error
- func (s *Sync) Once(ctx context.Context, wait time.Duration) error
- func (s *Sync) Register(subject string, fn Func)
- func (s *Sync) Start(ctx context.Context, onceTimeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithNamePrefix ¶ added in v0.2.3
func WithNamePrefix(name string) syncOption
WithNamePrefix is used to set the name prefix for the continue event This is useful if you have multiple instance of same serive running and using a unique name for each instance make sure that each instance process their own queue of messages. Restarting the instance with the same name will make sure that the instance will continue processing the messages from the last point.
func WithSubject ¶ added in v0.0.9
func WithSubject(subject string) syncOption
Types ¶
Click to show internal directories.
Click to hide internal directories.