{"id":15329499,"url":"https://github.com/tisonkun/pulsar-admin-go","last_synced_at":"2025-10-09T22:30:45.006Z","repository":{"id":190080677,"uuid":"681906574","full_name":"tisonkun/pulsar-admin-go","owner":"tisonkun","description":"The Go library for pulsar admin operations,  providing a unified Go API for managing pulsar resources such as tenants, namespaces and topics, etc.","archived":false,"fork":true,"pushed_at":"2023-08-23T02:52:31.000Z","size":637,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-26T18:39:25.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"streamnative/pulsar-admin-go","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tisonkun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2023-08-23T02:48:55.000Z","updated_at":"2023-08-23T02:48:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cf89aae-d981-4e10-835d-4a62897079d7","html_url":"https://github.com/tisonkun/pulsar-admin-go","commit_stats":null,"previous_names":["tisonkun/pulsar-admin-go"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fpulsar-admin-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fpulsar-admin-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fpulsar-admin-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fpulsar-admin-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tisonkun","download_url":"https://codeload.github.com/tisonkun/pulsar-admin-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235873412,"owners_count":19058770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T09:48:10.092Z","updated_at":"2025-10-09T22:30:39.645Z","avatar_url":"https://github.com/tisonkun.png","language":null,"readme":"\u003c!--\n\t\n\tCopyright 2023 StreamNative, Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n--\u003e\n\n# Pulsar Admin Go Library\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/streamnative/pulsar-admin-go.svg)](https://pkg.go.dev/github.com/streamnative/pulsar-admin-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/streamnative/pulsar-admin-go)](https://goreportcard.com/report/github.com/streamnative/pulsar-admin-go)\n[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/streamnative/pulsar-admin-go/blob/master/LICENSE)\n\nPulsar-Admin-Go is a [Go](https://go.dev) library for [Apache Pulsar](https://pulsar.apache.org/). It provides a unified Go API for managing pulsar resources such as tenants, namespaces and topics, etc.\n\n## Motivation\n\nCurrently many projects (e.g, [terraform-provider-pulsar](https://github.com/streamnative/terraform-provider-pulsar) and [pulsar-resources-operator](https://github.com/streamnative/pulsar-resources-operator)) \nthat need to manipulate the pulsar admin resources rely on the [pulsarctl](https://github.com/streamnative/pulsarctl), \nwhich poses challenges for dependency management and versioning as we have to release a new pulsarctl to get updates.\nSo we decoupled the pulsar admin related api from pulsarctl and created the [pulsar-admin-go](https://github.com/streamnative/pulsar-admin-go) library based on it, \nwhich also provides a clearer perspective and maintainability from an architectural perspective.\n\n## Quickstart\n\n### Prerequisite\n\n- go1.18+\n- pulsar-admin-go in go.mod\n\n  ```shell\n  go get github.com/streamnative/pulsar-admin-go\n  ```\n\n### Manage pulsar tenants\n\n- List all tenants\n\n```go\nimport (\n    \"github.com/streamnative/pulsar-admin-go\"\n)\n\nfunc main() {\n    cfg := \u0026pulsaradmin.Config{}\n    admin, err := pulsaradmin.NewClient(cfg)\n    if err != nil {\n        panic(err)\n    }\n    \n    tenants, _ := admin.Tenants().List()\n}\n```\n\n### Manage pulsar namespaces\n\n- List all namespaces\n\n```go\nimport (\n    \"github.com/streamnative/pulsar-admin-go\"\n)\n\nfunc main() {\n    cfg := \u0026pulsaradmin.Config{}\n    admin, err := pulsaradmin.NewClient(cfg)\n    if err != nil {\n        panic(err)\n    }\n    \n    namespaces, _ := admin.Namespaces().GetNamespaces(\"public\")\n}\n```\n\n- Create a new namespace\n\n```go\nimport (\n    \"github.com/streamnative/pulsar-admin-go\"\n)\n\nfunc main() {\n    cfg := \u0026pulsaradmin.Config{}\n    admin, err := pulsaradmin.NewClient(cfg)\n    if err != nil {\n        panic(err)\n    }\n    \n    admin.Namespaces().CreateNamespace(\"public/dev\")\n}\n```\n\n### Manage pulsar topics\n\n- Create a topic\n\n```go\n\nimport (\n    \"github.com/streamnative/pulsar-admin-go\"\n    \"github.com/streamnative/pulsar-admin-go/pkg/utils\"\n)\n\nfunc main() {\n    cfg := \u0026pulsaradmin.Config{}\n    admin, err := pulsaradmin.NewClient(cfg)\n    if err != nil {\n        panic(err)\n    }\n    \n    topic, _ := utils.GetTopicName(\"public/dev/topic\")\n    \n    admin.Topics().Create(*topic, 3)\n}\n```\n\n## Contributing\n\nContributions are warmly welcomed and greatly appreciated! \nThe project follows the typical GitHub pull request model. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details. \nBefore starting any work, please either comment on an existing issue, or file a new one.\n\n## License\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). See [LICENSE](LICENSE)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisonkun%2Fpulsar-admin-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftisonkun%2Fpulsar-admin-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisonkun%2Fpulsar-admin-go/lists"}