package repeater
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/repeater"
Index ¶
- Constants
- func New( ctx context.Context, interval time.Duration, task func(ctx context.Context) (err error), opts ...option, ) *repeater
- func WithClock(clock clockwork.Clock) option
- func WithEvent(ctx context.Context, event Event) context.Context
- func WithInterval(interval time.Duration) option
- func WithName(name string) option
- func WithTrace(trace *trace.Driver) option
- type Event
- type Repeater
Constants ¶
const ( EventUnknown = Event("") EventInit = Event("init") EventTick = Event("tick") EventForce = Event("force") EventCancel = Event("cancel") )
Functions ¶
func New ¶
func New( ctx context.Context, interval time.Duration, task func(ctx context.Context) (err error), opts ...option, ) *repeater
New creates and begins to execute task periodically.
func WithClock ¶
func WithEvent ¶
func WithInterval ¶
func WithName ¶
func WithName(name string) option
func WithTrace ¶
Types ¶
type Event ¶
type Event = string
func EventType ¶
type Repeater ¶
type Repeater interface { Stop() Force() }
Source Files ¶
- Version
- v3.108.0 (latest)
- Published
- Apr 21, 2025
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 3 minutes ago –
Tools for package owners.