Documentation
¶
Index ¶
Constants ¶
View Source
const ServiceName = "example-flaky"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExampleFlaky ¶
type ExampleFlaky struct{}
ExampleFlaky demonstrates retry behavior with state. It tracks how many times it has been called in a temp file. It fails on the first attempts and succeeds on the last retry. On success it cleans up the temp file so the next run starts fresh.
func New ¶
func New() (*ExampleFlaky, error)
func (*ExampleFlaky) MaxRetries ¶
func (f *ExampleFlaky) MaxRetries() int
MaxRetries makes ExampleFlaky implement the Retryable interface.
func (*ExampleFlaky) Name ¶
func (f *ExampleFlaky) Name() string
func (*ExampleFlaky) RetryDelay ¶
func (f *ExampleFlaky) RetryDelay() time.Duration
Click to show internal directories.
Click to hide internal directories.