34 lines
488 B
Go
34 lines
488 B
Go
package processor
|
|
|
|
import (
|
|
"context"
|
|
"task-processor/internal/taskAgent"
|
|
)
|
|
|
|
const pkgLogHeader string = "Processor |"
|
|
|
|
type handler struct {
|
|
*service
|
|
}
|
|
|
|
type Addr struct {
|
|
Host string
|
|
Port uint16
|
|
User string
|
|
Pass string
|
|
Vhost string
|
|
}
|
|
|
|
type Deps struct {
|
|
Ctx context.Context
|
|
TA taskAgent.TaskAgent
|
|
Addr Addr
|
|
ChanLen uint
|
|
LoggerEnabled bool
|
|
}
|
|
|
|
func NewHandler(deps Deps) Processor {
|
|
return &handler{
|
|
service: newService(deps),
|
|
}
|
|
}
|