{"id":22213948,"url":"https://github.com/xmlking/micro","last_synced_at":"2026-01-27T09:40:21.760Z","repository":{"id":142313658,"uuid":"202653062","full_name":"xmlking/micro","owner":"xmlking","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-18T17:10:43.000Z","size":352,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T20:06:17.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmlking.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":"2019-08-16T03:37:12.000Z","updated_at":"2019-12-18T17:10:46.000Z","dependencies_parsed_at":"2023-06-18T15:07:08.853Z","dependency_job_id":null,"html_url":"https://github.com/xmlking/micro","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/xmlking/micro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/micro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-02T21:12:42.928Z","updated_at":"2026-01-27T09:40:21.741Z","avatar_url":"https://github.com/xmlking.png","language":"Makefile","readme":"# Micro\n\n\u003e Custom build for `micro/micro:latest` with\n\n- [static selector go-plugins](https://github.com/micro/go-plugins/tree/master/client/selector/static) to use with k8s e2e testing.\n- [cors go-plugins](https://github.com/micro/go-plugins/tree/master/micro/cors) to use as a `REST Gateway` for gRPC microservices. CORS enabled.\n- [googlepubsub go-plugins](https://github.com/micro/go-plugins/tree/master/broker/googlepubsub) optionally, use `googlepubsub` as broker, along with micro-cli. i.e., `micro --broker=googlepubsub`\n\n## Build\n\n```bash\ngo build -o build/ ./...\n# build and install micro-cli to ~/go/bin\ngo install ./...\n```\n\n## Test\n\n```bash\n# health checking with micro. use correct target service gRPC port below\nmicro health --check_service=account-srv --check_address=0.0.0.0:55493\n# when backend is TLS enabled use INSECURE_SKIP_VERIFY=true\nINSECURE_SKIP_VERIFY=true micro health --check_service=account-srv --check_address=0.0.0.0:55493\nmicro --selector static  call 10.60.1.101:8080 Debug.Health\n# when backend is TLS enabled use INSECURE_SKIP_VERIFY=true\nINSECURE_SKIP_VERIFY=true micro call 10.60.1.101:8080 Debug.Health\n```\n\n## Run\n\n```bash\n# with plugins (cors, kubernetes )\ngo run main.go plugin.go  api --enable_rpc=true\n# without plugins\ngo run main.go  api --enable_rpc=true\n```\n\n## Using googlepubsub as broker\n\n\u003e overwrite plugin options via Environment variables `MICRO_(PLUGIN)_(OPTION)`\n\nIn Terminal 1, Start Google PubSub emulator\n\n```bash\n# start pubsub emulator\nexport PROJECT_ID=my-project-id\ngcloud beta emulators pubsub start --project=$PROJECT_ID --host-port=localhost:8085\n# Create topic `emailersrv` (optional)\n# Note: First time when you run accountsrv service, it will automatically create topic\ngcloud pubsub topics create emailersrv\n```\n\nIn Terminal 2, run Emailer Service\n\n```bash\nexport PROJECT_ID=my-project-id\n# PUBSUB_EMULATOR_HOST for Dev\n$(gcloud beta emulators pubsub env-init)\nexport PUBSUB_EMULATOR_HOST=localhost:8085\n\n# set GOOGLE_APPLICATION_CREDENTIALS for Prod\n# export GOOGLE_APPLICATION_CREDENTIALS=~/path/your_project_credentials.json\nexport MICRO_BROKER=googlepubsub\nmake run-emailer ARGS=\"--server_address=localhost:8080\"\n```\n\n## Docker\n\n\u003e from project root directory, run following commands.\n\n### Docker Build\n\n\u003e Simple\n\n```bash\nexport VERSION=v1.18.0\nmake docker DOCKER_REGISTRY=docker.pkg.github.com DOCKER_CONTEXT_PATH=xmlking/micro-starter-kit VERSION=$VERSION GO_MICRO_VERSION=$VERSION\n# push\ndocker push docker.pkg.github.com/xmlking/micro-starter-kit/micro:$VERSION\n```\n\n\u003e TL;DR\n\n```bash\n# build\nVERSION=0.1.0-SNAPSHOT\n# DOCKER_REGISTRY=gcr.io\nDOCKER_CONTEXT_PATH=xmlking\ndocker build --rm \\\n--build-arg VERSION=$VERSION \\\n--build-arg DOCKER_REGISTRY=${DOCKER_REGISTRY} \\\n--build-arg DOCKER_CONTEXT_PATH=${DOCKER_CONTEXT_PATH} \\\n--build-arg VCS_REF=$(git rev-parse --short HEAD) \\\n--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \\\n-t ${DOCKER_REGISTRY:+${DOCKER_REGISTRY}/}${DOCKER_CONTEXT_PATH}/micro:${VERSION} .\n\nIMANGE_NAME=${DOCKER_REGISTRY:+${DOCKER_REGISTRY}/}${DOCKER_CONTEXT_PATH}/micro:${VERSION}\n\n# push\ndocker push $IMANGE_NAME\n\n# check\ndocker inspect  $IMANGE_NAME\n# remove temp images after build\ndocker image prune -f\n# Remove dangling images\ndocker rmi $(docker images -f \"dangling=true\" -q)\n# Remove images tagged with vendor=sumo\ndocker rmi $(docker images -f \"label=org.label-schema.vendor=sumo\"  -q)\n```\n\n### Docker Run\n\n\u003e run just for testing image...\n\n```bash\ndocker run -it \\\n-e MICRO_API_ADDRESS=0.0.0.0:8080 \\\n-e MICRO_BROKER_ADDRESS=0.0.0.0:10001 \\\n-e MICRO_REGISTRY=mdns \\\n-p 8080:8080 -p 10001:10001 $IMANGE_NAME api\n```\n\n```bash\nCORS_ALLOWED_HEADERS=\"Authorization,Content-Type\"\n# CORS_ALLOWED_ORIGINS=\"*\"\n# important - don't  put a / at the end of the ORIGINS\nCORS_ALLOWED_ORIGINS=\"http://localhost:4200,https://api.kashmora.com\"\nCORS_ALLOWED_METHODS=\"POST,GET\"\n```\n\n### Ref\n\n\u003chttps://micro.mu/docs/go-grpc.html\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fmicro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fmicro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fmicro/lists"}