{"id":19795092,"url":"https://github.com/embeddedenterprises/service","last_synced_at":"2025-06-30T17:39:17.902Z","repository":{"id":57509256,"uuid":"130995662","full_name":"EmbeddedEnterprises/service","owner":"EmbeddedEnterprises","description":"The robulab service library is a convenience wrapper for easy microservice creation.","archived":false,"fork":false,"pushed_at":"2019-07-30T06:52:03.000Z","size":88,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T16:06:24.876Z","etag":null,"topics":["burrow","convenience-wrappers","crossbar-broker","go","microservice","nexus","wamp"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmbeddedEnterprises.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}},"created_at":"2018-04-25T11:23:20.000Z","updated_at":"2019-07-30T06:52:05.000Z","dependencies_parsed_at":"2022-08-30T07:10:34.894Z","dependency_job_id":null,"html_url":"https://github.com/EmbeddedEnterprises/service","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/EmbeddedEnterprises/service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbeddedEnterprises","download_url":"https://codeload.github.com/EmbeddedEnterprises/service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fservice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262820263,"owners_count":23369612,"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":["burrow","convenience-wrappers","crossbar-broker","go","microservice","nexus","wamp"],"created_at":"2024-11-12T07:15:26.637Z","updated_at":"2025-06-30T17:39:17.849Z","avatar_url":"https://github.com/EmbeddedEnterprises.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# service [![Latest Tag](https://img.shields.io/github/tag/EmbeddedEnterprises/service.svg)](https://github.com/EmbeddedEnterprises/service/releases) [![Build Status](https://travis-ci.org/EmbeddedEnterprises/service.svg?branch=master)](https://travis-ci.org/EmbeddedEnterprises/service) [![Go Report Card](https://goreportcard.com/badge/github.com/EmbeddedEnterprises/service)](https://goreportcard.com/report/github.com/EmbeddedEnterprises/service) [![GoDoc](https://godoc.org/github.com/EmbeddedEnterprises/service?status.svg)](https://godoc.org/github.com/EmbeddedEnterprises/service)\n\nThe robµlab service library is a convenience wrapper for easy microservice creation.\n\n---\n\n## How to add to your project?\n\nRun this in your project\n\n```sh\n$ burrow get github.com/embeddedenterprises/service\n```\n\nand use the library in your sourcecode like this.\n\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/EmbeddedEnterprises/service\"\n\t\"github.com/gammazero/nexus/client\"\n\t\"github.com/op/go-logging\"\n)\n\nfunc main() {\n\tsrv := service.New(service.Config{\n\t\tName:          \"example\",\n\t\tSerialization: client.MSGPACK,\n\t\tVersion:       \"0.1.0\",\n\t\tDescription:   \"Simple example microservice from the documentation.\",\n\t})\n\tsrv.Connect()\n\n\t// register and subscribe here\n\n\tsrv.Run()\n\tos.Exit(service.ExitSuccess)\n}\n```\n\n## Running the examples\n\n### Simple example\n\nFirst you have to start a WAMP router in the background (i.e. crossbar.io or nexus):\n\n```sh\n$ docker run -p 127.0.0.1:8080:8080 --name crossbar --rm crossbario/crossbar:latest\n```\n\nThe you can run the example service like this:\n\n```sh\n$ burrow run --example simple -- -b ws://localhost:8080/ws -r realm1\n```\n\n### Authentication example\n\nFirst you have to start a WAMP router configured with authentication in the background:\n\n```sh\n$ docker run -p 127.0.0.1:8080:8080 \\\n    --mount type=bind,source=$(pwd)/example/auth/crossbar.json,target=/node/.crossbar/config.json \\\n    --name crossbar --rm crossbario/crossbar:latest\n```\n\nThen you can run the auth example like this:\n\n```sh\n$ burrow run --example auth -- -b ws://localhost:8080/ws -u WRONG\n# Should yield 'no such principal with authid WRONG'\n\n$ burrow run --example auth -- -b ws://localhost:8080/ws -u CORRECT\n# Should yield 'authentication failed'\n\n$ burrow run --example auth -- -b ws://localhost:8080/ws -u CORRECT -p CORRECT\n# Should work just like the 'simple' example.\n```\n\nThe service library supports several authentication modes:\n\n- Anonymous (i.e. no username and password is specified), the client is authenticated\n  using other features, like remote-ip or some specific socket\n- Ticket (normal username and password)\n- TLS Client Auth, which provides encryption and authentication utilizing a PKI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedenterprises%2Fservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembeddedenterprises%2Fservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedenterprises%2Fservice/lists"}