{"id":15056432,"url":"https://github.com/lpgauth/anchor","last_synced_at":"2025-04-10T04:10:43.049Z","repository":{"id":57478877,"uuid":"21792005","full_name":"lpgauth/anchor","owner":"lpgauth","description":"High-Performance Erlang Memcached Client","archived":false,"fork":false,"pushed_at":"2021-10-25T13:13:10.000Z","size":4518,"stargazers_count":15,"open_issues_count":4,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-14T14:03:00.628Z","etag":null,"topics":["client","erlang","high-performance","memcached"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/lpgauth.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-07-13T14:17:49.000Z","updated_at":"2024-03-14T14:03:00.629Z","dependencies_parsed_at":"2022-09-17T04:42:37.835Z","dependency_job_id":null,"html_url":"https://github.com/lpgauth/anchor","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Fanchor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Fanchor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Fanchor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgauth%2Fanchor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpgauth","download_url":"https://codeload.github.com/lpgauth/anchor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154986,"owners_count":21056543,"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":["client","erlang","high-performance","memcached"],"created_at":"2024-09-24T21:51:23.134Z","updated_at":"2025-04-10T04:10:43.029Z","avatar_url":"https://github.com/lpgauth.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anchor\n\nHigh-Performance Erlang Memcached Client\n\n[![Build Status](https://travis-ci.org/lpgauth/anchor.svg?branch=master)](https://travis-ci.org/lpgauth/anchor)\n[![Coverage Status](https://coveralls.io/repos/github/lpgauth/anchor/badge.svg?branch=master)](https://coveralls.io/github/lpgauth/anchor?branch=master)\n#### Requirements\n\n* Memcached\n* Erlang 16.0 +\n\n#### Features\n\n* Backpressure via backlog (OOM protection)\n* Binary protocol\n* Fast pool implementation (random | round_robin)\n* Performance optimized\n* Request pipelining\n\n## API\n\u003ca href=\"http://github.com/lpgauth/anchor/blob/master/doc/anchor.md#index\" class=\"module\"\u003eFunction Index\u003c/a\u003e\n\n#### Environment variables\n\n\u003ctable width=\"100%\"\u003e\n  \u003ctheader\u003e\n    \u003cth\u003eName\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDefault\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/theader\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ebacklog_size\u003c/td\u003e\n    \u003ctd\u003epos_integer()\u003c/td\u003e\n    \u003ctd\u003e1024\u003c/td\u003e\n    \u003ctd\u003emaximum number of concurrent requests per connection\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eip\u003c/td\u003e\n    \u003ctd\u003elist()\u003c/td\u003e\n    \u003ctd\u003e\"127.0.0.1\"\u003c/td\u003e\n    \u003ctd\u003eserver ip\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003epool_size\u003c/td\u003e\n    \u003ctd\u003epos_integer()\u003c/td\u003e\n    \u003ctd\u003e16\u003c/td\u003e\n    \u003ctd\u003enumber of connections\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003epool_strategy\u003c/td\u003e\n    \u003ctd\u003erandom | round_robin\u003c/td\u003e\n    \u003ctd\u003erandom\u003c/td\u003e\n    \u003ctd\u003econnection selection strategy\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eport\u003c/td\u003e\n    \u003ctd\u003epos_integer()\u003c/td\u003e\n    \u003ctd\u003e9042\u003c/td\u003e\n    \u003ctd\u003eserver port\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ereconnect\u003c/td\u003e\n    \u003ctd\u003eboolean()\u003c/td\u003e\n    \u003ctd\u003etrue\u003c/td\u003e\n    \u003ctd\u003ereconnect closed connections\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ereconnect_time_max\u003c/td\u003e\n    \u003ctd\u003eboolean()\u003c/td\u003e\n    \u003ctd\u003etrue\u003c/td\u003e\n    \u003ctd\u003ereconnect maximum time\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ereconnect_time_min\u003c/td\u003e\n    \u003ctd\u003eboolean()\u003c/td\u003e\n    \u003ctd\u003etrue\u003c/td\u003e\n    \u003ctd\u003ereconnect minimum time\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003esocket_options\u003c/td\u003e\n    \u003ctd\u003e[gen_tcp:connect_option()]\u003c/td\u003e\n    \u003ctd\u003e\n        [binary,\n        {buffer, 65535},\n        {nodelay, true},\n        {packet, raw},\n        {send_timeout, 50},\n        {send_timeout_close, true}]\n    \u003c/td\u003e\n    \u003ctd\u003eoptions passed to the socket\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Examples\n\n```erlang\n1\u003e anchor_app:start().\n{ok, [shackle, anchor]}\n\n2\u003e anchor:get(\u003c\u003c\"foo\"\u003e\u003e).\n{error, key_not_found}\n\n3\u003e anchor:set(\u003c\u003c\"foo\"\u003e\u003e, \u003c\u003c\"bar\"\u003e\u003e, 3600).\nok\n\n4\u003e anchor:get(\u003c\u003c\"foo\"\u003e\u003e).\n{ok, \u003c\u003c\"bar\"\u003e\u003e}\n\n5\u003e anchor:delete(\u003c\u003c\"foo\"\u003e\u003e).\nok\n\n6\u003e {ok, Ref} = anchor:async_get(\u003c\u003c\"foo\"\u003e\u003e).\n{ok, {anchor_6, #Ref\u003c0.0.1.1363\u003e}}\n\n7\u003e anchor:receive_response(Ref, 1000).\n{error, key_not_found}\n```\n\n## Tests\n\n```makefile\nmake dialyzer\nmake elvis\nmake eunit\nmake xref\n```\n\n## License\n\n```license\nThe MIT License (MIT)\n\nCopyright (c) 2014-2017 Louis-Philippe Gauthier\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgauth%2Fanchor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpgauth%2Fanchor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgauth%2Fanchor/lists"}