Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPoolSize = 8 // DefaultPoolSize is the default size of the pool. DefaultBufferSize = 64 // DefaultBufferSize is the default size of the work channel buffer. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a congigurable collection of Probes that run functions on available goroutines.
type PoolConfig ¶
type PoolConfig struct { LogHandler slog.Handler // Handler to use for pool logging. If empty, probe.NoopHandler will be used. Ctx context.Context // Context to use for the pool. If empty, context.Background will be used. Size int // Size of the pool. Default pool size is 8. BufferSize int // Size of the work channel buffer. Default buffer size is 64. }
PoolConfig is a struct for passing configuration data to a new Pool.
Click to show internal directories.
Click to hide internal directories.