trc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateCanceled = "Canceled"
	StateStarted  = "Started"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ITask

type ITask interface {
	GetCode() string
	GetBeginTime() time.Time
	GetEndTime() time.Time
	GetCount() int
}

type Trc

type Trc[T ITask] struct {
	*svc.Svc[T]
	// contains filtered or unexported fields
}

func NewTrc

func NewTrc[T ITask](prefix string, timeshares [24]int) *Trc[T]

func (*Trc[T]) Clean

func (t *Trc[T]) Clean(duration time.Duration) error

func (*Trc[T]) GetState

func (t *Trc[T]) GetState(task T) string

func (*Trc[T]) Run

func (t *Trc[T]) Run(tasks []T, process func(T) error) error

Jump to

Keyboard shortcuts

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