Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultQueryTimeout is the default timeout for database queries DefaultQueryTimeout = 5 * time.Second // LongQueryTimeout is for complex queries that may take longer LongQueryTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func WithCustomTimeout ¶
func WithCustomTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
WithCustomTimeout adds a custom timeout duration
func WithLongQueryTimeout ¶
WithLongQueryTimeout adds a longer timeout for complex queries
func WithQueryTimeout ¶
WithQueryTimeout adds a timeout to the context for database queries Returns the new context and a cancel function that should be deferred
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.