mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
revert(config): added back pointer for agent and notification config for correct unmarshaling
This commit is contained in:
@@ -197,7 +197,7 @@ func (state *state) initNotification() error {
|
|||||||
|
|
||||||
dispatcher := notif.StartNotifDispatcher(state.task)
|
dispatcher := notif.StartNotifDispatcher(state.task)
|
||||||
for _, notifier := range notifCfg {
|
for _, notifier := range notifCfg {
|
||||||
dispatcher.RegisterProvider(¬ifier)
|
dispatcher.RegisterProvider(notifier)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -279,8 +279,8 @@ func (state *state) loadRouteProviders() error {
|
|||||||
errs.Add(gperr.PrependSubject(a.String(), err))
|
errs.Add(gperr.PrependSubject(a.String(), err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
agent.AddAgent(&a)
|
agent.AddAgent(a)
|
||||||
p := route.NewAgentProvider(&a)
|
p := route.NewAgentProvider(a)
|
||||||
providersCh <- p
|
providersCh <- p
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ type (
|
|||||||
TimeoutShutdown int `json:"timeout_shutdown" validate:"gte=0"`
|
TimeoutShutdown int `json:"timeout_shutdown" validate:"gte=0"`
|
||||||
}
|
}
|
||||||
Providers struct {
|
Providers struct {
|
||||||
Files []string `json:"include" yaml:"include,omitempty" validate:"dive,filepath"`
|
Files []string `json:"include" yaml:"include,omitempty" validate:"dive,filepath"`
|
||||||
Docker map[string]string `json:"docker" yaml:"docker,omitempty" validate:"non_empty_docker_keys,dive,unix_addr|url"`
|
Docker map[string]string `json:"docker" yaml:"docker,omitempty" validate:"non_empty_docker_keys,dive,unix_addr|url"`
|
||||||
Agents []agent.AgentConfig `json:"agents" yaml:"agents,omitempty"`
|
Agents []*agent.AgentConfig `json:"agents" yaml:"agents,omitempty"`
|
||||||
Notification []notif.NotificationConfig `json:"notification" yaml:"notification,omitempty"`
|
Notification []*notif.NotificationConfig `json:"notification" yaml:"notification,omitempty"`
|
||||||
Proxmox []proxmox.Config `json:"proxmox" yaml:"proxmox,omitempty"`
|
Proxmox []proxmox.Config `json:"proxmox" yaml:"proxmox,omitempty"`
|
||||||
MaxMind *maxmind.Config `json:"maxmind" yaml:"maxmind,omitempty"`
|
MaxMind *maxmind.Config `json:"maxmind" yaml:"maxmind,omitempty"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user