mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
refactor(agent): update logging message format in agent initialization, rename Start* to Init*
This commit is contained in:
@@ -40,7 +40,7 @@ func (cfg *Config) VerifyNewAgent(host string, ca agent.PEMPair, client agent.PE
|
||||
|
||||
var agentCfg agent.AgentConfig
|
||||
agentCfg.Addr = host
|
||||
err := agentCfg.InitWithCerts(cfg.Task().Context(), ca.Cert, client.Cert, client.Key)
|
||||
err := agentCfg.InitWithCerts(cfg.task.Context(), ca.Cert, client.Cert, client.Key)
|
||||
if err != nil {
|
||||
return 0, gperr.Wrap(err, "failed to start agent")
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ func (cfg *Config) loadRouteProviders(providers *config.Providers) gperr.Error {
|
||||
removeAllAgents()
|
||||
|
||||
for _, agent := range providers.Agents {
|
||||
if err := agent.Start(cfg.task); err != nil {
|
||||
if err := agent.Init(cfg.task.Context()); err != nil {
|
||||
errs.Add(err.Subject(agent.String()))
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user