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
Click to show internal directories.
Click to hide internal directories.