{"id":19746890,"url":"https://github.com/finitereality/singyeong.net","last_synced_at":"2025-06-28T16:39:33.994Z","repository":{"id":135891071,"uuid":"225033128","full_name":"FiniteReality/Singyeong.Net","owner":"FiniteReality","description":"An asynchronous client library for Singyeong, a metadata-oriented service mesh","archived":false,"fork":false,"pushed_at":"2019-12-20T19:40:10.000Z","size":76,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T20:53:04.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/FiniteReality.png","metadata":{"files":{"readme":"docs/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-11-30T15:38:05.000Z","updated_at":"2022-05-15T03:31:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ea22f89-8860-4812-b92a-951d29940331","html_url":"https://github.com/FiniteReality/Singyeong.Net","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2FSingyeong.Net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2FSingyeong.Net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2FSingyeong.Net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2FSingyeong.Net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FiniteReality","download_url":"https://codeload.github.com/FiniteReality/Singyeong.Net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241078412,"owners_count":19905852,"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-11-12T02:16:09.711Z","updated_at":"2025-02-28T00:17:44.980Z","avatar_url":"https://github.com/FiniteReality.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Singyeong.Net [![MyGet][myget-image]][myget-link] [![Pipelines][ci-pipeline-image]][ci-pipeline-link] #\n\nAn asynchronous client library for [신경][singyeong], a dynamic metadata-oriented\nservice mesh.\n\n## WARNING ##\n\nIf 신경 is alpha quality software, then Singyeong.Net is pre-alpha quality\nsoftware. Expect things to break spectacularly.\n\n## Usage ##\n\nAt the simplest level:\n\n```cs\nvar client = new SingyeongClientBuilder(\"application id here\")\n    // Repeat this for how much initial metadata you have\n    .AddMetadata\u003cTValue\u003e(\"name\", value)\n    // Repeat this for however many endpoints you have\n    .AddEndpoint(\"ws://localhost:4000/gateway/websocket\", null)\n    .Build();\n```\nThen, wherever else:\n```cs\n// Cancel the cancel token to cause the client to stop... hopefully gracefully.\nawait client.RunAsync(cancellationToken);\n```\nTo publish events, use:\n```cs\nawait client.SendToAsync(\"application id here\", payload,\n    allowRestricted: true, // or false\n    query: (x) =\u003e\n        x.Metadata\u003cdouble\u003e(\"latency\") \u003c 50.0 \u0026\u0026\n        x.Metadata\u003cstring[]\u003e(\"tags\").Contains(\"production\")\n    );\n```\nTo update/remove metadata, use:\n```cs\nawait client.SetMetadataAsync\u003cTValue\u003e(\"key\", value);\nawait client.RemoveMetadataAsync(\"key\");\n```\nTo read dispatches, use:\n```cs\nvar reader = client.DispatchReader;\nwhile (await reader.WaitToReadAsync(cancellationToken))\n{\n    while (reader.TryRead(out var dispatch))\n    {\n        // dispatch is the raw payload sent in the dispatch, including the\n        // nonce field. This is so you can implement your own reading logic on\n        // top of this, as well as get access to the nonce for indempotency if\n        // necessary.\n    }\n}\n```\n\n## To-Do ##\n\n- Add further error handling\n- Set up CI\n- Publish NuGet packages\n- Add unit tests\n- Clean up the codebase\n- Add better failover strategies\n\n[ci-pipeline-link]: https://gitlab.com/FiniteReality/Singyeong.Net/pipelines\n[ci-pipeline-image]: https://gitlab.com/FiniteReality/Singyeong.Net/badges/master/pipeline.svg\n[myget-link]: https://www.myget.org/feed/finitereality/package/nuget/Singyeong.Net\n[myget-image]: https://img.shields.io/myget/finitereality/vpre/Singyeong.Net.svg?label=myget\n[singyeong]: https://github.com/queer/singyeong\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitereality%2Fsingyeong.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinitereality%2Fsingyeong.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitereality%2Fsingyeong.net/lists"}