package timetest

import "github.com/ydb-platform/ydb-go-sdk/v3/testutil/timeutil/timetest"

Index

Types

type SingleTimerStub

type SingleTimerStub struct {
	TimerStub
	Cleanup func()
}

func StubSingleTimer

func StubSingleTimer(t testing.TB) *SingleTimerStub

type Timer

type Timer struct {
	Ch      <-chan time.Time
	OnReset func(time.Duration) bool
	OnStop  func() bool
}

func (Timer) C

func (t Timer) C() <-chan time.Time

func (Timer) Reset

func (t Timer) Reset(d time.Duration) bool

func (Timer) Stop

func (t Timer) Stop() bool

type TimerStub

type TimerStub struct {
	C       chan time.Time
	Created chan time.Duration
	Reset   chan time.Duration
	// contains filtered or unexported fields
}

func (*TimerStub) Init

func (t *TimerStub) Init() (success bool)

type TimerStubs

type TimerStubs map[string]*TimerStub

func StubTimers

func StubTimers(t *testing.T, callers ...string) (ts TimerStubs, cleanup func())

Source Files

timetest.go

Version
v3.39.0
Published
Oct 27, 2022
Platform
linux/amd64
Imports
6 packages
Last checked
2 minutes ago

Tools for package owners.