Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Add command cluster update_failure_domain (#36)
Browse files Browse the repository at this point in the history
master issue: #2
  • Loading branch information
zymap authored and maxsxu committed Mar 14, 2023
1 parent 200e3bc commit 7901a46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/pulsar/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Clusters interface {
GetFailureDomain(clusterName, domainName string) (FailureDomainData, error)
ListFailureDomains(string) (FailureDomainMap, error)
DeleteFailureDomain(FailureDomainData) error
UpdateFailureDomain(FailureDomainData) error
}

type clusters struct {
Expand Down Expand Up @@ -91,3 +92,7 @@ func (c *clusters) DeleteFailureDomain(data FailureDomainData) error {
endpoint := c.client.endpoint(c.basePath, data.ClusterName, "failureDomains", data.DomainName)
return c.client.delete(endpoint, nil)
}
func (c *clusters) UpdateFailureDomain(data FailureDomainData) error {
endpoint := c.client.endpoint(c.basePath, data.ClusterName, "failureDomains", data.DomainName)
return c.client.post(endpoint, &data, nil)
}

0 comments on commit 7901a46

Please sign in to comment.