{"id":23060225,"url":"https://github.com/grunmax/testservers","last_synced_at":"2025-07-03T21:34:14.741Z","repository":{"id":186085991,"uuid":"55165777","full_name":"grunmax/TestServers","owner":"grunmax","description":"test golang project (tcp, http servers)","archived":false,"fork":false,"pushed_at":"2016-04-02T18:45:44.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T20:02:59.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grunmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-03-31T16:26:44.000Z","updated_at":"2016-03-31T16:40:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"628bb594-3fc0-4536-8679-2378fed5a475","html_url":"https://github.com/grunmax/TestServers","commit_stats":null,"previous_names":["grunmax/testservers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grunmax/TestServers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunmax%2FTestServers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunmax%2FTestServers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunmax%2FTestServers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunmax%2FTestServers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grunmax","download_url":"https://codeload.github.com/grunmax/TestServers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunmax%2FTestServers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263407724,"owners_count":23461907,"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-12-16T03:11:40.009Z","updated_at":"2025-07-03T21:34:14.702Z","avatar_url":"https://github.com/grunmax.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestServers\nTest golang project with tcp and http servers.\n\n\u003e This app reads word list by tcp, sends data to non-blocking buffer in concurrent way. \n\u003e Also reads synchronously from buffer and increment value in storage map for each received word/key.\n\u003e Http server makes json for top N words received.\n\u003e All data store in memory only.\n\n### tcp server\nConfig params in INI file:\n - host = localhost //\n - port = 9000 //\n - buffersize = 2048 //bytes read\n - minrunes = 3 //min word length in runes\n\nRun netcat command:\n```sh\n$ echo \"alfa zulu bravo ad whiskey Танго\" | nc localhost 9000\n```\n\nTCP response:\n```sh\ntcp:ok:38:5\n```\n\u003e tcp - constant part, ok/err - result (err - no words accepted), 38 - bytes received, 5 - words accepted count\n\n\n### http server\n\nConfig params in INI file:\n - host = localhost //\n - port = 8000 //\n\nhttp server has only one test api:\n[http://localhost:8000/top?N=3](http://localhost:8000/top?N=3)\n\nand returns top received words in json\n```json\n{\"count\":3,\"top_words\":[\"zulu\",\"alfa\",\"bravo\"]}\n```\n\u003e count = 3 is a real count value for top word list, \n\u003e in case with equal count values sorts by name\n\n### data setting\n\nConfig params in INI file:\n - buffersize = 20 // \"slots\" in buffered channel (received lists)\n - debug = true // visualize passing data in console","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunmax%2Ftestservers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrunmax%2Ftestservers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunmax%2Ftestservers/lists"}