Documentation
¶
Index ¶
- Constants
- func WithCloseItemTimeout[PT Item[T], T any](t time.Duration) option[PT, T]
- func WithCreateFunc[PT Item[T], T any](f func(ctx context.Context) (PT, error)) option[PT, T]
- func WithCreateItemTimeout[PT Item[T], T any](t time.Duration) option[PT, T]
- func WithLimit[PT Item[T], T any](size int) option[PT, T]
- func WithTrace[PT Item[T], T any](t *Trace) option[PT, T]
- type ChangeInfo
- type CloseDoneInfo
- type CloseStartInfo
- type GetDoneInfo
- type GetStartInfo
- type Item
- type NewDoneInfo
- type NewStartInfo
- type Pool
- type PutDoneInfo
- type PutStartInfo
- type Trace
- type TryDoneInfo
- type TryStartInfo
- type WithDoneInfo
- type WithStartInfo
Constants ¶
View Source
const DefaultLimit = 50
Variables ¶
This section is empty.
Functions ¶
func WithCloseItemTimeout ¶ added in v3.59.0
func WithCreateFunc ¶ added in v3.58.0
func WithCreateItemTimeout ¶ added in v3.59.0
Types ¶
type ChangeInfo ¶ added in v3.59.0
type CloseDoneInfo ¶ added in v3.58.0
type CloseDoneInfo struct {
Error error
}
type CloseStartInfo ¶ added in v3.58.0
type CloseStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
type GetDoneInfo ¶ added in v3.58.0
type GetDoneInfo struct {
Error error
}
type GetStartInfo ¶ added in v3.58.0
type GetStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
type NewDoneInfo ¶ added in v3.58.0
type NewDoneInfo struct {
Limit int
}
type NewStartInfo ¶ added in v3.58.0
type NewStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
type PutDoneInfo ¶ added in v3.58.0
type PutDoneInfo struct {
Error error
}
type PutStartInfo ¶ added in v3.58.0
type PutStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
type Trace ¶ added in v3.58.0
type Trace struct {
OnNew func(*NewStartInfo) func(*NewDoneInfo)
OnClose func(*CloseStartInfo) func(*CloseDoneInfo)
OnTry func(*TryStartInfo) func(*TryDoneInfo)
OnWith func(*WithStartInfo) func(*WithDoneInfo)
OnPut func(*PutStartInfo) func(*PutDoneInfo)
OnGet func(*GetStartInfo) func(*GetDoneInfo)
OnChange func(ChangeInfo)
}
type TryDoneInfo ¶ added in v3.58.0
type TryDoneInfo struct {
Error error
}
type TryStartInfo ¶ added in v3.58.0
type TryStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
type WithDoneInfo ¶ added in v3.58.0
type WithStartInfo ¶ added in v3.58.0
type WithStartInfo struct {
// Context make available context in trace stack.Callerback function.
// Pointer to context provide replacement of context in trace stack.Callerback function.
// Warning: concurrent access to pointer on client side must be excluded.
// Safe replacement of context are provided only inside stack.Callerback function
Context *context.Context
Call stack.Caller
}
Click to show internal directories.
Click to hide internal directories.