exampledatabase

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "example-database"

Variables

This section is empty.

Functions

This section is empty.

Types

type ExampleDatabase

type ExampleDatabase struct{}

ExampleDatabase demonstrates retry behavior. It simulates a database connection pool that retries on failure.

func New

func New() (*ExampleDatabase, error)

func (*ExampleDatabase) MaxRetries

func (d *ExampleDatabase) MaxRetries() int

MaxRetries returns the number of retry attempts. This makes ExampleDatabase implement the Retryable interface.

func (*ExampleDatabase) Name

func (d *ExampleDatabase) Name() string

func (*ExampleDatabase) RetryDelay

func (d *ExampleDatabase) RetryDelay() time.Duration

func (*ExampleDatabase) Run

func (d *ExampleDatabase) Run(
	ctx context.Context,
) error

func (*ExampleDatabase) Stop

func (d *ExampleDatabase) Stop(
	_ context.Context,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL