feat: deprecate old notification module and introduce new notifier module

This commit is contained in:
Fu Diwei
2025-04-24 20:27:20 +08:00
parent 2d17501072
commit 7478dd7f47
27 changed files with 692 additions and 265 deletions

View File

@@ -63,17 +63,18 @@ func (n *deployNode) Process(ctx context.Context) error {
}
// 初始化部署器
deployer, err := deployer.NewWithDeployNode(n.node, struct {
Certificate string
PrivateKey string
}{Certificate: certificate.Certificate, PrivateKey: certificate.PrivateKey})
deployer, err := deployer.NewWithWorkflowNode(deployer.DeployerWithWorkflowNodeConfig{
Node: n.node,
Logger: n.logger,
CertificatePEM: certificate.Certificate,
PrivateKeyPEM: certificate.PrivateKey,
})
if err != nil {
n.logger.Warn("failed to create deployer provider")
return err
}
// 部署证书
deployer.SetLogger(n.logger)
if err := deployer.Deploy(ctx); err != nil {
n.logger.Warn("failed to deploy")
return err