feat: publish standalone worker

Separate worker packaging and service lifecycle from the control plane.
Этот коммит содержится в:
Gleb Tv
2026-07-13 17:55:14 +03:00
Коммит 2c7a0236da
309 изменённых файлов: 44004 добавлений и 0 удалений

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
}