package repeater

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/repeater"

Index

Constants

const (
	EventUnknown = Event("")
	EventTick    = Event("tick")
	EventForce   = Event("force")
	EventCancel  = Event("cancel")
)

Functions

func New

func New(
	interval time.Duration,
	task func(ctx context.Context) (err error),
	opts ...option,
) *repeater

New creates and begins to execute task periodically.

func WithClock

func WithClock(clock clockwork.Clock) option

func WithInterval

func WithInterval(interval time.Duration) option

func WithName

func WithName(name string) option

func WithTrace

func WithTrace(trace *trace.Driver) option

Types

type Event

type Event = string

func EventType

func EventType(ctx context.Context) Event

type Repeater

type Repeater interface {
	Stop()
	Force()
}

Source Files

repeater.go

Version
v3.53.4
Published
Oct 19, 2023
Platform
windows/amd64
Imports
6 packages
Last checked
56 seconds ago

Tools for package owners.