Add Gitter support

This commit is contained in:
Wim
2016-09-04 20:03:07 +02:00
parent 44144587a0
commit 12389d602e
20 changed files with 1782 additions and 1 deletions

21
vendor/github.com/mrexodia/wray/transport.go generated vendored Normal file
View File

@@ -0,0 +1,21 @@
package wray
import (
"errors"
)
type Transport interface {
isUsable(string) bool
connectionType() string
send(map[string]interface{}) (Response, error)
setUrl(string)
}
func SelectTransport(client *FayeClient, transportTypes []string, disabled []string) (Transport, error) {
for _, transport := range registeredTransports {
if contains(transport.connectionType(), transportTypes) && transport.isUsable(client.url) {
return transport, nil
}
}
return nil, errors.New("No usable transports available")
}