Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGormLocker ¶
Types ¶
type CronJobLock ¶
type CronJobLock struct { ID int CreatedAt time.Time UpdatedAt time.Time JobName string `gorm:"index:idx_name,unique"` JobIdentifier string `gorm:"index:idx_name,unique"` Worker string `gorm:"not null;default:null"` Status string `gorm:"not nullldefault:null"` }
func (*CronJobLock) GetID ¶
func (cjb *CronJobLock) GetID() int
func (*CronJobLock) SetJobIdentifier ¶
func (cjb *CronJobLock) SetJobIdentifier(ji string)
type LockOption ¶
type LockOption func(*gormLocker)
func WithJobIdentifier ¶
func WithJobIdentifier(f func(ctx context.Context, key string) string) LockOption
Click to show internal directories.
Click to hide internal directories.