{"id":17270355,"url":"https://github.com/ilgooz/bon","last_synced_at":"2025-04-14T08:13:27.633Z","repository":{"id":81479381,"uuid":"139259597","full_name":"ilgooz/bon","owner":"ilgooz","description":"Routing capability for your net.Conn's like you do with for your http handlers.","archived":false,"fork":false,"pushed_at":"2018-07-03T07:32:58.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-27T21:51:50.739Z","etag":null,"topics":["connection","net","routing","yamux"],"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/ilgooz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-30T15:26:20.000Z","updated_at":"2024-01-09T06:41:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"71373ef1-fc4c-427a-98ff-9f2962a7ca88","html_url":"https://github.com/ilgooz/bon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fbon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fbon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fbon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fbon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilgooz","download_url":"https://codeload.github.com/ilgooz/bon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248843941,"owners_count":21170495,"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":["connection","net","routing","yamux"],"created_at":"2024-10-15T08:19:25.016Z","updated_at":"2025-04-14T08:13:27.600Z","avatar_url":"https://github.com/ilgooz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bon [![GoDoc](https://godoc.org/github.com/ilgooz/bon?status.svg)](https://godoc.org/github.com/ilgooz/bon) [![Go Report Card](https://goreportcard.com/badge/github.com/ilgooz/bon)](https://goreportcard.com/report/github.com/ilgooz/bon) [![Build Status](https://travis-ci.org/ilgooz/bon.svg?branch=master)](https://travis-ci.org/ilgooz/bon)\n\nBon provides routing capability for your net.Conn's like you do with for your\nhttp handlers. It can both accept and open connections like described in Transporter.\nThus, you can both Connect to a route and invoke a handler of one when requested by others.\n\nSee [Transporter](https://godoc.org/github.com/ilgooz/bon/#Transporter) to implement your own net.Conn provider.\n\n```\ngo get gopkg.in/ilgooz/bon.v1\n```\n## Usage\n\n```go\nconst (\n  // Define your routes.\n  GRPCConn bon.Route = 1 \u003c\u003c iota\n)\n\nremoteService := bon.New(remoteServiceTransporter)\nremoteService.Handle(GRPCConn, func(conn net.Conn){\n  // do domething with your conn...\n})\ngo remoteService.Run()\n\n\nservice := bon.New(serviceTransporter)\nconn, err := service.Connect(GRPCConn)\n// do domething with your conn...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fbon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filgooz%2Fbon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fbon/lists"}