Skip to content
/ bon Public

Routing capability for your net.Conn's like you do with for your http handlers.

License

Notifications You must be signed in to change notification settings

ilgooz/bon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 3, 2018
5ea3fbc · Jul 3, 2018

History

4 Commits
Jun 30, 2018
Jul 1, 2018
Jun 30, 2018
Jul 1, 2018
Jul 1, 2018
Jun 30, 2018
Jun 30, 2018
Jul 3, 2018

Repository files navigation

bon GoDoc Go Report Card Build Status

Bon provides routing capability for your net.Conn's like you do with for your http handlers. It can both accept and open connections like described in Transporter. Thus, you can both Connect to a route and invoke a handler of one when requested by others.

See Transporter to implement your own net.Conn provider.

go get gopkg.in/ilgooz/bon.v1

Usage

const (
  // Define your routes.
  GRPCConn bon.Route = 1 << iota
)

remoteService := bon.New(remoteServiceTransporter)
remoteService.Handle(GRPCConn, func(conn net.Conn){
  // do domething with your conn...
})
go remoteService.Run()


service := bon.New(serviceTransporter)
conn, err := service.Connect(GRPCConn)
// do domething with your conn...

About

Routing capability for your net.Conn's like you do with for your http handlers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages