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/bridge/network.go
Jana Radhakrishnan 4ac519f7b6 - Added initial test cases for libnetwork api
- Introduce delete api

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-08 16:00:28 +00:00

28 lines
491 B
Go

package bridge
import (
"github.com/docker/libnetwork"
"github.com/vishvananda/netlink"
)
type bridgeNetwork struct {
NetworkName string
bridge *bridgeInterface
}
func (b *bridgeNetwork) Name() string {
return b.NetworkName
}
func (b *bridgeNetwork) Type() string {
return networkType
}
func (b *bridgeNetwork) Link(name string) ([]*libnetwork.Interface, error) {
// TODO
return nil, nil
}
func (b *bridgeNetwork) Delete() error {
return netlink.LinkDel(b.bridge.Link)
}