mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 21:44:54 +00:00
feat: adapt new logging to workflow node processors
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
)
|
||||
|
||||
type Deployer interface {
|
||||
SetLogger(*slog.Logger)
|
||||
|
||||
Deploy(ctx context.Context) error
|
||||
}
|
||||
|
||||
@@ -67,6 +69,14 @@ type proxyDeployer struct {
|
||||
deployPrivateKey string
|
||||
}
|
||||
|
||||
func (d *proxyDeployer) SetLogger(logger *slog.Logger) {
|
||||
if logger == nil {
|
||||
panic("logger is nil")
|
||||
}
|
||||
|
||||
d.logger = logger
|
||||
}
|
||||
|
||||
func (d *proxyDeployer) Deploy(ctx context.Context) error {
|
||||
_, err := d.deployer.Deploy(ctx, d.deployCertificate, d.deployPrivateKey)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user