beam: Router can route beam messages with a convenient set of rules and handlers
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
parent
992a3f9c96
commit
36231f23a3
4 changed files with 246 additions and 6 deletions
|
@ -851,13 +851,9 @@ func SendToConn(connections chan net.Conn, src beam.Receiver) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func msgDesc(payload []byte, attachment *os.File) string {
|
||||
var filedesc string = "<nil>"
|
||||
if attachment != nil {
|
||||
filedesc = fmt.Sprintf("%d", attachment.Fd())
|
||||
}
|
||||
return fmt.Sprintf("'%s'[%s]", payload, filedesc)
|
||||
|
||||
func msgDesc(payload []byte, attachment *os.File) string {
|
||||
return beam.MsgDesc(payload, attachment)
|
||||
}
|
||||
|
||||
func ReceiveFromConn(connections chan net.Conn, dst beam.Sender) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue