Documentation ¶
Index ¶
- Variables
- type Locker
- type RedisLocker
- func (m *RedisLocker) GetHostRunning(taskName string) (string, error)
- func (m *RedisLocker) IsRunning(taskName string) (bool, error)
- func (m *RedisLocker) NotifyRunning(taskName string) error
- func (m *RedisLocker) NotifyStoppedRunning(taskName string) error
- func (m *RedisLocker) RunWhenReady(ctx context.Context, taskName string, task func(context.Context)) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyRunning = errors.New("Task already running")
)
Functions ¶
This section is empty.
Types ¶
type RedisLocker ¶
type RedisLocker struct {
// contains filtered or unexported fields
}
func (*RedisLocker) GetHostRunning ¶
func (m *RedisLocker) GetHostRunning(taskName string) (string, error)
func (*RedisLocker) NotifyRunning ¶
func (m *RedisLocker) NotifyRunning(taskName string) error
func (*RedisLocker) NotifyStoppedRunning ¶
func (m *RedisLocker) NotifyStoppedRunning(taskName string) error
func (*RedisLocker) RunWhenReady ¶
Click to show internal directories.
Click to hide internal directories.