package repeater

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

Index

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 Repeater

type Repeater interface {
	Stop()
	Force()
}

Source Files

repeater.go

Version
v3.42.12
Published
Mar 3, 2023
Platform
windows/amd64
Imports
8 packages
Last checked
1 second ago

Tools for package owners.