{"id":42198171,"url":"https://github.com/syhlion/redisocket.v2","last_synced_at":"2026-01-27T00:20:06.657Z","repository":{"id":57484179,"uuid":"63576598","full_name":"syhlion/redisocket.v2","owner":"syhlion","description":"redisocket v2","archived":false,"fork":false,"pushed_at":"2022-12-07T01:26:29.000Z","size":223,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T03:30:35.813Z","etag":null,"topics":["golang-package","redis","websocket"],"latest_commit_sha":null,"homepage":null,"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/syhlion.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-07-18T06:35:14.000Z","updated_at":"2022-08-04T01:12:13.000Z","dependencies_parsed_at":"2023-01-23T15:16:38.824Z","dependency_job_id":null,"html_url":"https://github.com/syhlion/redisocket.v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syhlion/redisocket.v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syhlion%2Fredisocket.v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syhlion%2Fredisocket.v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syhlion%2Fredisocket.v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syhlion%2Fredisocket.v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syhlion","download_url":"https://codeload.github.com/syhlion/redisocket.v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syhlion%2Fredisocket.v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28792763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: 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":["golang-package","redis","websocket"],"created_at":"2026-01-27T00:20:05.412Z","updated_at":"2026-01-27T00:20:06.313Z","avatar_url":"https://github.com/syhlion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redisocket.v2\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/syhlion/redisocket.v2)](https://goreportcard.com/report/github.com/syhlion/redisocket.v2)\n[![Build Status](https://travis-ci.org/syhlion/redisocket.v2.svg?branch=master)](https://travis-ci.org/syhlion/redisocket.v2)\n\nBase on gorilla/websocket \u0026 garyburd/redigo\n\nImplement By Observer pattern\n\n## Documention\n\n* [API Reference](https://godoc.org/github.com/syhlion/redisocket.v2)\n\n## Install\n\n`go get github.com/syhlion/redisocket.v2`\n\n## Usaged\n\n``` go\nfunc TestEvent(d []byte) (data []byte, err error) {\n\treturn d, nil\n}\n\nfunc main() {\n\tpool := redis.NewPool(func() (redis.Conn, error) {\n\t\treturn redis.Dial(\"tcp\", \":6379\")\n\t}, 10)\n\tapp := redisocket.NewHub(pool,false)\n\n\terr := make(chan error)\n\tgo func() {\n\t\terr \u003c- app.Listen()\n\t}()\n\n\thttp.HandleFunc(\"/ws\", func(w http.ResponseWriter, r *http.Request) {\n\n        client,err:= app.Upgrade(w, r, nil, \"Scott\", \"appKey\")\n\t\tif err != nil {\n\t\t\tlog.Fatal(\"Client Connect Error\")\n\t\t\treturn\n\t\t}\n\t\terr = client.Listen(func(data []byte) (d []byte, err error) {\n\t\t\treturn data,nil\n\n\t\t})\n\t\tlog.Println(err, \"http point\")\n\t\treturn\n\t})\n\n\tgo func() {\n\t\terr \u003c- http.ListenAndServe(\":8888\", nil)\n\t}()\n\tselect {\n\tcase e := \u003c-err:\n\t\tlog.Println(e)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyhlion%2Fredisocket.v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyhlion%2Fredisocket.v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyhlion%2Fredisocket.v2/lists"}