Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool provides a pool of byte slices for use as buffers.
func NewBufferPool ¶
func NewBufferPool(count int) *BufferPool
NewBufferPool creates a pool of byte slices.
func (*BufferPool) Get ¶
func (bp *BufferPool) Get(size int64) []byte
Get retrieves a byte buffer with the required capacity.
func (*BufferPool) Put ¶
func (bp *BufferPool) Put(buf []byte)
Put returns a byte buffer to the pool for future reuse.
type ScannerPool ¶
type ScannerPool struct {
// contains filtered or unexported fields
}
ScannerPool provides a pool of yara-x scanners.
func NewScannerPool ¶
func NewScannerPool(yrs *yarax.Rules, count int) *ScannerPool
NewScannerPool creates a pool containing the specified number of yara-x scanners.
func (*ScannerPool) Close ¶ added in v1.13.0
func (sp *ScannerPool) Close()
Close destroys all active scanners. Currently unused.
func (*ScannerPool) Get ¶
func (sp *ScannerPool) Get(yrs *yarax.Rules) *yarax.Scanner
Get retrieves a scanner from the scanner pool, blocking if none are available.
func (*ScannerPool) Put ¶
func (sp *ScannerPool) Put(scanner *yarax.Scanner)
Put returns a scanner to the scanner pool.
Click to show internal directories.
Click to hide internal directories.