cron

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxQueueSize int    // максимальное количество задач, которое может быть в очереди
	WorkerCount  int    // количество воркеров
	WorkerFunc   Worker // воркер
}

конфигурация крона

type Struct

type Struct struct {
	// contains filtered or unexported fields
}

структура крона

func Start

func Start(config Config) *Struct

запускаем крон

func (*Struct) AddTask

func (cron *Struct) AddTask(dataInterface interface{}) error

добавляем задачу в крон

type TaskStruct

type TaskStruct struct {
	DataInterface interface{} // интерфес содержащий любые данные
}

структура задачи

type Worker

type Worker func(*TaskStruct)

функция воркера

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL