feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
Этот коммит содержится в:
15
internal/webapp/scan.go
Обычный файл
15
internal/webapp/scan.go
Обычный файл
@@ -0,0 +1,15 @@
|
||||
package webapp
|
||||
|
||||
import "bufio"
|
||||
|
||||
// bufioNewScanner is a thin wrapper around bufio.NewScanner with a
|
||||
// 1 MiB max line size. Most /proc files fit comfortably under that.
|
||||
// Splitting it out lets tests override the buffer size if needed.
|
||||
func bufioNewScanner(r interface {
|
||||
Read(p []byte) (int, error)
|
||||
},
|
||||
) *bufio.Scanner {
|
||||
s := bufio.NewScanner(r)
|
||||
s.Buffer(make([]byte, 0, 64*1024), 1<<20)
|
||||
return s
|
||||
}
|
||||
Ссылка в новой задаче
Block a user