 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interval ¶
type Repository ¶
type Repository interface {
	Locks() guard.LockerFactory[StateID]
	States() StateRepository
}
    type Scheduler ¶
type Scheduler struct{ Repository Repository }
    func (Scheduler) WithSchedule ¶
Example ¶
package main
import (
	"context"
	"go.llib.dev/frameless/pkg/tasker/schedule"
	"log"
)
func main() {
	scheduler := schedule.Scheduler{
		Repository: nil, // &postgresql.TaskerScheduleRepository{CM: cm},
	}
	task := scheduler.WithSchedule("db maintenance", schedule.Monthly{Day: 1}, func(ctx context.Context) error {
		return nil
	})
	if err := task(context.Background()); err != nil {
		log.Println("ERROR", err.Error())
	}
}
type StateRepository ¶
 Click to show internal directories. 
   Click to hide internal directories.