{"id":36464908,"url":"https://github.com/huton-io/huton","last_synced_at":"2026-01-12T00:01:45.454Z","repository":{"id":57569694,"uuid":"61264651","full_name":"huton-io/huton","owner":"huton-io","description":"An embeddable and distributed in-memory key-value store written in Go","archived":false,"fork":false,"pushed_at":"2021-03-06T07:47:01.000Z","size":13100,"stargazers_count":20,"open_issues_count":11,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-20T08:16:18.635Z","etag":null,"topics":["cache","datagrid","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/huton-io.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":"2016-06-16T05:27:39.000Z","updated_at":"2023-12-13T21:11:03.000Z","dependencies_parsed_at":"2022-09-26T19:00:44.380Z","dependency_job_id":null,"html_url":"https://github.com/huton-io/huton","commit_stats":null,"previous_names":["jonbonazza/huton"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huton-io/huton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huton-io%2Fhuton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huton-io%2Fhuton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huton-io%2Fhuton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huton-io%2Fhuton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huton-io","download_url":"https://codeload.github.com/huton-io/huton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huton-io%2Fhuton/sbom","scorecard":{"id":474106,"data":{"date":"2025-08-11","repo":{"name":"github.com/huton-io/huton","commit":"987ed721684cbab9de12003e9ceec6ee8573ff2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang:1.8.3 to golang:1.8.3@sha256:32c769bf92205580d6579d5b93c3c705f787f6c648105f00bb88a35024c7f8e4","Warn: goCommand not pinned by hash: Dockerfile:4","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T14:48:43.104Z","repository_id":57569694,"created_at":"2025-08-19T14:48:43.104Z","updated_at":"2025-08-19T14:48:43.104Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cache","datagrid","golang"],"created_at":"2026-01-12T00:01:45.386Z","updated_at":"2026-01-12T00:01:45.445Z","avatar_url":"https://github.com/huton-io.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"Go\"\u003e\u003c/a\u003eGo"],"sub_categories":[],"readme":"# huton\n[![Go Report Card](https://goreportcard.com/badge/github.com/huton-io/huton)](https://goreportcard.com/report/github.com/huton-io/huton) [![Build Status](https://travis-ci.org/huton-io/huton.svg?branch=master)](https://travis-ci.org/huton-io/huton)\n\nHuton is an embeddable and distributed in-memory key-value store inspired by the likes of [Redis](https://redis.io/) and [memcached](https://memcached.org/) and written in the Go programming language.\n\nReplication is handled via the [Raft](https://raft.github.io/) consensus algorithm and data is replicated to all members of the cluster. Existing cluster members will see near-immediate consistency, while new members coming online will see eventual consistency.\n\nHuton is considered **prototype** status, and is not yet ready for production use. It is under active development and welcomes contributions.\n\n# Example Usage\nHuton currently expects a quorum of nodes before the cluster is considered stable. This means that you need _at least_ 3 nodes to complete a cluster.\nTo begin, start two huton agents:\n```bash\n$ huton agent -name agent1 -bindPort 8100 -peers 127.0.0.1:8100,127.0.0.1:8200 -expect 3\n$ huton agent -name agent2 -bindPort 8200 -peers 127.0.0.1:8100,127.0.0.1:8200 -expect 3\n```\nHuton requires that the name of each node in a cluster be unique. If one or more nodes have the same name, this can cause havoc with the internal peer list.\n\nIt should also be noted that even though in this example, we are seeding the cluster with huton agents, the agents aren't really needed at all. A cluster can (and probably will, in a real world scenario) consist entirely of huton instances embedded in an application.\n\nOnce the two agents are started, only one more node is needed to reach quorum. If you run the below Go code, it will join the cluster and provide an HTTP resource to get and put data.\n```go\npackage main\n\nimport (\n\t\"strings\"\n\t\"net/http\"\n\t\"github.com/huton-io/huton/lib\"\n\t\"flag\"\n)\n\nfunc main() {\n\tvar instanceName string\n\tvar peers string\n\tvar port int\n\tflag.StringVar(\u0026instanceName, \"name\", \"\", \"unique instance name\")\n\tflag.StringVar(\u0026peers, \"peers\", \"\", \"comma delimited list of seed peers\")\n\tflag.IntVar(\u0026port, \"port\", 8300, \"bind port\")\n\tflag.Parse()\n\tif instanceName == \"\" {\n\t\tpanic(\"No instance name provided\")\n\t}\n\tif peers == \"\" {\n\t\tpanic(\"No peers provided.\")\n\t}\n\tinstance, err := huton.NewInstance(instanceName, huton.BindPort(port), huton.BootstrapExpect(3))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t_, err = instance.Join(strings.Split(peers, \",\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\thttp.HandleFunc(\"/\", handler(instance))\n\t\n\tgo func () {\n\t\tif err = http.ListenAndServe(\"127.0.0.1:8080\", nil); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}()\n\tsignalCh := make(chan os.Signal, 1)\n\tsignal.Notify(signalCh, os.Interrupt, syscall.SIGTERM, syscall.SIGKILL)\n\t\u003c-signalCh\n\tc.instance.Shutdown()\n}\n\nfunc handler(instance huton.Instance) func(w http.ResponseWriter, req *http.Request) {\n\treturn func(w http.ResponseWriter, req *http.Request) {\n\t\tcache, err := instance.Cache(\"exampleBucket\")\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Failed to get bucket.\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tswitch req.Method {\n\t\tcase http.MethodGet:\n\t\t\tss := cache.Snapshot()\n\t\t\tval := ss.Get([]byte(\"key\"))\n\t\t\tw.Write(val)\n\t\tcase http.MethodPost:\n\t\t\tbatch := cache.NewBatch(1, 8)\n\t\t\tif err = batch.Set([]byte(\"key\"), []byte(\"value\")); err != nil {\n\t\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err = cache.ExecuteBatch(batch); err != nil {\n\t\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\t}\n\t\t}\n\t}\n}\n\n```\nThe above code example illustrates how you can embed Huton within an application.\n\nStart the above program:\n```bash\ngo run main.go -name app -bindPort 8300 -peers 127.0.0.1:8100,127.0.0.1:8200\n```\n\nOnce all three nodes are started and connected to each other, put some data:\n```bash\ncurl -v -X POST http://127.0.0.1:8080/\n```\nNow retrieve the data:\n```bash\ncurl -v http://127.0.0.1:8080/\n```\nThe HTTP resource should return the text _value_.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuton-io%2Fhuton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuton-io%2Fhuton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuton-io%2Fhuton/lists"}