zrok/agent/access.go

31 lines
604 B
Go
Raw Normal View History

2024-09-13 20:40:55 +02:00
package agent
import (
2024-09-17 03:32:17 +02:00
"github.com/michaelquigley/pfxlog"
2024-09-13 20:40:55 +02:00
"github.com/openziti/zrok/agent/proctree"
"github.com/openziti/zrok/cmd/zrok/subordinate"
2024-09-13 20:40:55 +02:00
)
type access struct {
2024-09-17 03:32:17 +02:00
frontendToken string
token string
2024-09-13 20:40:55 +02:00
bindAddress string
autoMode bool
autoAddress string
autoStartPort uint16
autoEndPort uint16
2024-09-13 20:40:55 +02:00
responseHeaders []string
process *proctree.Child
sub *subordinate.MessageHandler
2024-09-13 20:40:55 +02:00
2024-09-25 17:06:06 +02:00
agent *Agent
2024-09-13 20:40:55 +02:00
}
2024-09-17 03:32:17 +02:00
func (a *access) monitor() {
if err := proctree.WaitChild(a.process); err != nil {
pfxlog.ChannelLogger(a.token).Error(err)
}
2024-09-25 17:06:06 +02:00
a.agent.rmAccess <- a
2024-09-17 03:32:17 +02:00
}