{"id":13731018,"url":"https://github.com/lexborisov/yauid","last_synced_at":"2025-04-14T09:52:53.173Z","repository":{"id":23347774,"uuid":"26708517","full_name":"lexborisov/yauid","owner":"lexborisov","description":"A decentralized unique ID generator (int64)","archived":false,"fork":false,"pushed_at":"2016-06-15T15:55:16.000Z","size":13,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T23:11:38.655Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexborisov.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":"2014-11-16T08:41:28.000Z","updated_at":"2024-06-12T17:44:37.000Z","dependencies_parsed_at":"2022-08-21T23:10:53.306Z","dependency_job_id":null,"html_url":"https://github.com/lexborisov/yauid","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/lexborisov%2Fyauid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexborisov%2Fyauid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexborisov%2Fyauid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexborisov%2Fyauid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexborisov","download_url":"https://codeload.github.com/lexborisov/yauid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860079,"owners_count":21173339,"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-08-03T02:01:22.820Z","updated_at":"2025-04-14T09:52:53.118Z","avatar_url":"https://github.com/lexborisov.png","language":"C","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"yauid\n=====\n\nA decentralized unique ID generator (int64)\n\n## DESCRIPTION\n\nID generation at a node should not require coordination with other nodes. Ids should be roughly time-ordered when sorted lexicographically.\n\n## BUILD\n\nBuild succeeded on FreeBSD, Mac OS X and Linux. Use GNU Make\n\n##### FreeBSD\n\n```sh\ngmake\n```\n\n##### Other OS\n\n```sh\nmake\n```\n\n## METHODS\n\nSee api/yauid.h file\n\n## EXAMPLE\n\n```c\n#include \u003cstdio.h\u003e\n#include \u003cyauid.h\u003e\n\nint main(int argc, const char * argv[])\n{\n    yauid* yaobj = yauid_init(\"lock.yauid\", NULL);\n    \n    if(yaobj == NULL)\n    {\n        printf(\"Can't create object\\n\");\n        return 0;\n    }\n    \n    yauid_set_node_id(yaobj, 12);\n    \n    hkey_t key = yauid_get_key(yaobj);\n    \n    printf(\"yauid: %\"PRId64\"; time: %ld; node id: %ld; inc: %ld \\n\", key,\n                yauid_get_timestamp(key), yauid_get_node_id(key), yauid_get_inc_id(key));\n    \n    yauid_destroy(yaobj);\n    \n    return 0;\n}\n```\n\nSee more examples from examples directory\n\n## AUTHOR\n\nAlexander Borisov \u003clex.borisov@gmail.com\u003e\n\n## License\n\nCopyright (c) 2014 Alexander Borisov\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexborisov%2Fyauid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexborisov%2Fyauid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexborisov%2Fyauid/lists"}