From 08230ad982f1d29d95d486ee7d091c6d4f6ec25d Mon Sep 17 00:00:00 2001 From: Guijie Wang Date: Tue, 15 Aug 2023 00:19:42 +0800 Subject: [PATCH] Change the name from BackendSource to CredentialSource Signed-off-by: Guijie Wang --- pkg/daemon/command/command.go | 6 +++--- pkg/manager/daemon_adaptor.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/daemon/command/command.go b/pkg/daemon/command/command.go index 1d2dbd69ea..4b2621796b 100644 --- a/pkg/daemon/command/command.go +++ b/pkg/daemon/command/command.go @@ -35,7 +35,7 @@ type DaemonCommand struct { LogRotationSize int `type:"param" name:"log-rotation-size"` Supervisor string `type:"param" name:"supervisor"` LogFile string `type:"param" name:"log-file"` - BackendSource string `type:"param" name:"backend-source"` + CredentialSource string `type:"param" name:"credential-source"` } // Build exec style command line @@ -184,8 +184,8 @@ func WithUpgrade() Opt { } } -func WithBackendSource(source string) Opt { +func WithCredentialSource(source string) Opt { return func(cmd *DaemonCommand) { - cmd.BackendSource = source + cmd.CredentialSource = source } } \ No newline at end of file diff --git a/pkg/manager/daemon_adaptor.go b/pkg/manager/daemon_adaptor.go index 92d2932ed0..31cd40a968 100644 --- a/pkg/manager/daemon_adaptor.go +++ b/pkg/manager/daemon_adaptor.go @@ -156,7 +156,7 @@ func (m *Manager) BuildDaemonCommand(d *daemon.Daemon, bin string, upgrade bool) if config.IsCredentialSourceEnabled() { configApiPath := fmt.Sprintf(endpointGetBackendConfig, d.States.ID) cmdOpts = append(cmdOpts, - command.WithBackendSource(config.SystemControllerAddress() + configApiPath), + command.WithCredentialSource(config.SystemControllerAddress() + configApiPath), ) } default: