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) }