{"id":22690007,"url":"https://github.com/yahoojapan/k2hdkc_go","last_synced_at":"2025-04-12T22:08:06.695Z","repository":{"id":52655689,"uuid":"296472048","full_name":"yahoojapan/k2hdkc_go","owner":"yahoojapan","description":"K2HDKC Go library - k2hash based distributed kvs cluster ","archived":false,"fork":false,"pushed_at":"2021-04-22T05:02:15.000Z","size":72,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T22:07:47.310Z","etag":null,"topics":["antpickax","chmpx","distributed","golang","in-memory","k2hash","k2hdkc","kvs","nosql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/yahoojapan.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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":"2020-09-18T00:24:34.000Z","updated_at":"2024-11-27T21:59:29.000Z","dependencies_parsed_at":"2022-08-22T00:01:30.267Z","dependency_job_id":null,"html_url":"https://github.com/yahoojapan/k2hdkc_go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoojapan%2Fk2hdkc_go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoojapan%2Fk2hdkc_go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoojapan%2Fk2hdkc_go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoojapan%2Fk2hdkc_go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yahoojapan","download_url":"https://codeload.github.com/yahoojapan/k2hdkc_go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637769,"owners_count":21137538,"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":["antpickax","chmpx","distributed","golang","in-memory","k2hash","k2hdkc","kvs","nosql"],"created_at":"2024-12-10T00:25:05.482Z","updated_at":"2025-04-12T22:08:06.626Z","avatar_url":"https://github.com/yahoojapan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k2hdkc_go\n\n### Overview\n\n**k2hdkc_go** implements a [k2hdkc](https://k2hdkc.antpick.ax/) client in golang.\n\n### Install\n\nFirstly you must install the [k2hdkc](https://k2hdkc.antpick.ax/) shared library.\n```\n$ curl -o- https://raw.github.com/yahoojapan/k2hdkc_go/master/cluster/start_server.sh | bash\n```\nYou can install **k2hdkc** library step by step from [source code](https://github.com/yahoojapan/k2hdkc). See [Build](https://k2hdkc.antpick.ax/build.html) for details.\n\nAfter you make sure you set the [GOPATH](https://github.com/golang/go/wiki/SettingGOPATH) environment, download the **k2hdkc_go** package.\n```\n$ go get -u github.com/yahoojapan/k2hdkc_go\n```\n\n### Usage\n\nHere is a simple example of **k2hdkc_go** which save a key and get it.\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/yahoojapan/k2hdkc_go/k2hdkc\"\n)\n\nfunc setAndGet() {\n\tc := k2hdkc.NewClient(\"../../cluster/slave.yaml\", 8031)\n\tdefer c.Close()\n\t// save a hello key.\n\tif r, err := c.Set(\"hello\", \"world\"); r == nil || err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"client.Set(key, value) returned r %v err %v\\n\", r, err)\n\t\treturn\n\t}\n\t// get the key.\n\tr, err := c.Get(\"hello\")\n\tif r == nil || err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"client.Get(key) returned r %v err %v\\n\", r, err)\n\t\treturn\n\t}\n\tfmt.Println(r.String())\n}\n\nfunc main() {\n\tsetAndGet()\n}\n```\n\n### Development\n\nHere is the step to start developing **k2hdkc_go**.\n\n- Debian / Ubuntu\n\n```bash\n#!/bin/sh\n\nsudo apt-get update -y \u0026\u0026 sudo apt-get install curl git -y \u0026\u0026 curl -s https://packagecloud.io/install/repositories/antpickax/stable/script.deb.sh | sudo bash\nsudo apt-get install libfullock-dev k2hash-dev chmpx-dev k2hdkc-dev -y\ngo get github.com/yahoojapan/k2hdkc_go/k2hdkc\n\nexit 0\n```\n\n- CentOS / Fedora\n\n```bash\n#!/bin/sh\n\nsudo dnf makecache \u0026\u0026 sudo dnf install curl git -y \u0026\u0026 curl -s https://packagecloud.io/install/repositories/antpickax/stable/script.rpm.sh | sudo bash\nsudo dnf install libfullock-devel k2hash-devel chmpx-devel k2hdkc-devel -y\ngo get github.com/yahoojapan/k2hdkc_go/k2hdkc\n\nexit 0\n```\n\n### Documents\n  - [About k2hdkc](https://k2hdkc.antpick.ax/)\n  - [About AntPickax](https://antpick.ax/)\n\n### License\n\nMIT License. See the LICENSE file.\n\n## AntPickax\n\n[AntPickax](https://antpick.ax/) is \n  - an open source team in [Yahoo Japan Corporation](https://about.yahoo.co.jp/info/en/company/). \n  - a product family of open source software developed by [AntPickax](https://antpick.ax/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoojapan%2Fk2hdkc_go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyahoojapan%2Fk2hdkc_go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoojapan%2Fk2hdkc_go/lists"}