Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is used to config pool.
type Option ¶ added in v1.2.0
type Option interface {
// contains filtered or unexported methods
}
func WithErrorHandler ¶ added in v1.2.0
WithErrorHandler sets the panic handler.
func WithMeterProvider ¶ added in v1.2.0
func WithMeterProvider(mp metric.MeterProvider) Option
WithMeterProvider sets the meter provider.
func WithPanicHandler ¶ added in v1.2.0
WithErrorHandler sets the panic handler.
func WithScaleThreshold ¶ added in v1.2.0
WithScaleThreshold sets the scale threshold.
type Pool ¶
type Pool interface { // Name returns the corresponding pool name. Name() string // SetCap sets the goroutine capacity of the pool. SetCap(cap int32) // Go executes f. Go(f RoutineFunc) error // CtxGo executes f and accepts the context. CtxGo(ctx context.Context, f RoutineFunc) error // Stop the Pool graceful Stop(ctx context.Context) error }
type RoutineFunc ¶
Click to show internal directories.
Click to hide internal directories.