mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4ac519f7b6
- Introduce delete api Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
28 lines
491 B
Go
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)
|
|
}
|