@@ -67,12 +67,21 @@ pub struct ClientOptions {
6767 /// AppName
6868 #[ pyo3( set, get) ]
6969 pub app_name : Option < String > ,
70- /// Username for Auth
70+ /// Username for Auth, Login by Http with Token
7171 #[ pyo3( set, get) ]
7272 pub username : Option < String > ,
73- /// Password for Auth
73+ /// Password for Auth, Login by Http with Token
7474 #[ pyo3( set, get) ]
7575 pub password : Option < String > ,
76+ /// Access_Key for Auth, Login by Aliyun Ram
77+ #[ pyo3( set, get) ]
78+ pub access_key : Option < String > ,
79+ /// Access_Secret for Auth, Login by Aliyun Ram
80+ #[ pyo3( set, get) ]
81+ pub access_secret : Option < String > ,
82+ /// Signature_Region_Id for Auth, Login by Aliyun Ram
83+ #[ pyo3( set, get) ]
84+ pub signature_region_id : Option < String > ,
7685 /// naming push_empty_protection, default true
7786 #[ pyo3( set, get) ]
7887 pub naming_push_empty_protection : Option < bool > ,
@@ -84,12 +93,16 @@ pub struct ClientOptions {
8493#[ pymethods]
8594impl ClientOptions {
8695 #[ new]
96+ #[ allow( clippy:: too_many_arguments) ]
8797 pub fn new (
8898 server_addr : String ,
8999 namespace : String ,
90100 app_name : Option < String > ,
91101 username : Option < String > ,
92102 password : Option < String > ,
103+ access_key : Option < String > ,
104+ access_secret : Option < String > ,
105+ signature_region_id : Option < String > ,
93106 naming_push_empty_protection : Option < bool > ,
94107 naming_load_cache_at_start : Option < bool > ,
95108 ) -> PyResult < ClientOptions > {
@@ -99,6 +112,9 @@ impl ClientOptions {
99112 app_name,
100113 username,
101114 password,
115+ access_key,
116+ access_secret,
117+ signature_region_id,
102118 naming_push_empty_protection,
103119 naming_load_cache_at_start,
104120 } )
0 commit comments