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/setup.go

32 lines
572 B
Go
Raw Normal View History

package bridge
type SetupStep func(*Interface) error
type BridgeSetup struct {
bridge *Interface
steps []SetupStep
}
func NewBridgeSetup(i *Interface) *BridgeSetup {
return &BridgeSetup{bridge: i}
}
func (b *BridgeSetup) Apply() error {
for _, fn := range b.steps {
if err := fn(b.bridge); err != nil {
return err
}
}
return nil
}
func (b *BridgeSetup) QueueStep(step SetupStep) {
b.steps = append(b.steps, step)
}
//---------------------------------------------------------------------------//
func SetupIPTables(i *Interface) error {
return nil
}