From c59d3d7b71cd8c341f3255d4723e1516983c349c Mon Sep 17 00:00:00 2001 From: yangchun2 Date: Mon, 19 Jun 2023 14:51:28 +0800 Subject: [PATCH] fix #621 --- clients/config_client/config_client.go | 1 + clients/config_client/config_client_test.go | 1 + vo/config_param.go | 1 + 3 files changed, 3 insertions(+) diff --git a/clients/config_client/config_client.go b/clients/config_client/config_client.go index 34e90f32..132cb86a 100644 --- a/clients/config_client/config_client.go +++ b/clients/config_client/config_client.go @@ -247,6 +247,7 @@ func (client *ConfigClient) PublishConfig(param vo.ConfigParam) (published bool, request.AdditionMap["appName"] = param.AppName request.AdditionMap["betaIps"] = param.BetaIps request.AdditionMap["type"] = param.Type + request.AdditionMap["src_user"] = param.SrcUser request.AdditionMap["encryptedDataKey"] = param.EncryptedDataKey rpcClient := client.configProxy.getRpcClient(client) response, err := client.configProxy.requestProxy(rpcClient, request, constant.DEFAULT_TIMEOUT_MILLS) diff --git a/clients/config_client/config_client_test.go b/clients/config_client/config_client_test.go index 5239026b..04a66fca 100644 --- a/clients/config_client/config_client_test.go +++ b/clients/config_client/config_client_test.go @@ -145,6 +145,7 @@ func Test_PublishConfig(t *testing.T) { success, err := client.PublishConfig(vo.ConfigParam{ DataId: localConfigTest.DataId, Group: "group", + SrcUser: "nacos-client-go", Content: "hello world"}) assert.Nil(t, err) diff --git a/vo/config_param.go b/vo/config_param.go index 87698b27..e7e7d7fb 100644 --- a/vo/config_param.go +++ b/vo/config_param.go @@ -27,6 +27,7 @@ type ConfigParam struct { BetaIps string `param:"betaIps"` CasMd5 string `param:"casMd5"` Type string `param:"type"` + SrcUser string `param:"srcUser"` EncryptedDataKey string `param:"encryptedDataKey"` OnChange func(namespace, group, dataId, data string) }