Restructure go-micro layout and plugins

This commit is contained in:
Asim
2015-05-23 20:04:16 +01:00
parent 018183fa49
commit 74fd1fc989
39 changed files with 673 additions and 577 deletions

View File

@@ -27,10 +27,18 @@ type Transport interface {
Listen(addr string) (Listener, error)
}
type options struct{}
type Option func(*options)
var (
DefaultTransport Transport = NewHttpTransport([]string{})
DefaultTransport Transport = newHttpTransport([]string{})
)
func NewTransport(addrs []string, opt ...Option) Transport {
return newHttpTransport(addrs, opt...)
}
func Dial(addr string) (Client, error) {
return DefaultTransport.Dial(addr)
}