1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/drivers.go
Jana Radhakrishnan 5f8bfa8ade Added "host" driver and test code.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:25 +00:00

25 lines
498 B
Go

package libnetwork
import (
"github.com/docker/libnetwork/driverapi"
"github.com/docker/libnetwork/drivers/bridge"
"github.com/docker/libnetwork/drivers/host"
"github.com/docker/libnetwork/drivers/null"
)
type driverTable map[string]driverapi.Driver
func enumerateDrivers() driverTable {
drivers := make(driverTable)
for _, fn := range [](func() (string, driverapi.Driver)){
bridge.New,
host.New,
null.New,
} {
name, driver := fn()
drivers[name] = driver
}
return drivers
}