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
Alessandro Boch 80809c42c6 Add implementation and test for SetIPForwarding()
- Addressed Arnaud's comments

Signed-off-by: Alessandro Boch <aboch@socketplane.io>
2015-03-04 10:24:18 -08:00

31 lines
572 B
Go

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
}