@@ -305,6 +305,15 @@ type Namespaces interface {
305
305
// RemoveSubscriptionExpirationTime removes subscription expiration time from a namespace,
306
306
// defaulting to broker settings
307
307
RemoveSubscriptionExpirationTime (namespace utils.NameSpaceName ) error
308
+
309
+ // UpdateProperties updates the properties of a namespace
310
+ UpdateProperties (namespace utils.NameSpaceName , properties map [string ]string ) error
311
+
312
+ // GetProperties returns the properties of a namespace
313
+ GetProperties (namespace utils.NameSpaceName ) (map [string ]string , error )
314
+
315
+ // RemoveProperties clears the properties of a namespace
316
+ RemoveProperties (namespace utils.NameSpaceName ) error
308
317
}
309
318
310
319
type namespaces struct {
@@ -970,3 +979,20 @@ func (n *namespaces) RemoveSubscriptionExpirationTime(namespace utils.NameSpaceN
970
979
endpoint := n .pulsar .endpoint (n .basePath , namespace .String (), "subscriptionExpirationTime" )
971
980
return n .pulsar .Client .Delete (endpoint )
972
981
}
982
+
983
+ func (n * namespaces ) UpdateProperties (namespace utils.NameSpaceName , properties map [string ]string ) error {
984
+ endpoint := n .pulsar .endpoint (n .basePath , namespace .String (), "properties" )
985
+ return n .pulsar .Client .Put (endpoint , properties )
986
+ }
987
+
988
+ func (n * namespaces ) GetProperties (namespace utils.NameSpaceName ) (map [string ]string , error ) {
989
+ endpoint := n .pulsar .endpoint (n .basePath , namespace .String (), "properties" )
990
+ properties := make (map [string ]string )
991
+ err := n .pulsar .Client .Get (endpoint , & properties )
992
+ return properties , err
993
+ }
994
+
995
+ func (n * namespaces ) RemoveProperties (namespace utils.NameSpaceName ) error {
996
+ endpoint := n .pulsar .endpoint (n .basePath , namespace .String (), "properties" )
997
+ return n .pulsar .Client .Delete (endpoint )
998
+ }
0 commit comments