{"id":13590494,"url":"https://github.com/go-chassis/sc-client","last_synced_at":"2025-04-05T22:06:40.107Z","repository":{"id":46993592,"uuid":"117545255","full_name":"go-chassis/sc-client","owner":"go-chassis","description":"Go client of ServiceComb Service Center","archived":false,"fork":false,"pushed_at":"2025-03-24T07:38:24.000Z","size":231,"stargazers_count":58,"open_issues_count":0,"forks_count":25,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T21:05:30.883Z","etag":null,"topics":["microservice","servicecomb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-chassis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-15T12:54:39.000Z","updated_at":"2025-03-24T07:38:28.000Z","dependencies_parsed_at":"2024-06-18T15:13:32.107Z","dependency_job_id":"3fd6f377-045e-4aa1-8210-08822a03b0c1","html_url":"https://github.com/go-chassis/sc-client","commit_stats":null,"previous_names":["servicecomb/go-sc-client","go-chassis/go-sc-client"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-chassis%2Fsc-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-chassis%2Fsc-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-chassis%2Fsc-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-chassis%2Fsc-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-chassis","download_url":"https://codeload.github.com/go-chassis/sc-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406088,"owners_count":20933803,"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":["microservice","servicecomb"],"created_at":"2024-08-01T16:00:46.369Z","updated_at":"2025-04-05T22:06:40.075Z","avatar_url":"https://github.com/go-chassis.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Service Center client for go\nThis is a service center client which helps the microservice to interact with Service Center\nfor service-registration, discovery, instance registration etc.\n\nThis client implements [API](https://github.com/apache/servicecomb-service-center/blob/master/docs/openapi/v4.yaml) of Service Center.\n\n\n# Usage\n \n```go\nregistryClient, err := sc.NewClient(\n\tsc.Options{\n\t\tAddrs: []string{\"127.0.0.1:30100\"},\n\t})\n```\ndeclare and register micro service\n```go\nvar ms = new(discovery.MicroService)\nvar m = make(map[string]string)\n\nm[\"abc\"] = \"abc\"\nm[\"def\"] = \"def\"\n\nms.AppId = MSList[0].AppId\nms.ServiceName = MSList[0].ServiceName\nms.Version = MSList[0].Version\nms.Environment = MSList[0].Environment\nms.Properties = m\nsid, err := registryClient.RegisterService(ms)\n```\ndeclare and register instance\n```go\n\tmicroServiceInstance := \u0026discovery.MicroServiceInstance{\n\t\tEndpoints: []string{\"rest://127.0.0.1:3000\"},\n\t\tHostName:  hostname,\n\t\tStatus:    sc.MSInstanceUP,\n\t}\n\tid, err := registryClient.RegisterMicroServiceInstance(microServiceInstance)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-chassis%2Fsc-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-chassis%2Fsc-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-chassis%2Fsc-client/lists"}