sandbox.go 919 B

12345678910111213141516171819202122232425
  1. package sandbox
  2. import "github.com/docker/libnetwork/driverapi"
  3. // Sandbox represents a network sandbox, identified by a specific key. It
  4. // holds a list of Interfaces, routes etc, and more can be added dynamically.
  5. type Sandbox interface {
  6. // The path where the network namespace is mounted.
  7. Key() string
  8. // The collection of Interface previously added with the AddInterface
  9. // method. Note that this doesn't incude network interfaces added in any
  10. // other way (such as the default loopback interface which are automatically
  11. // created on creation of a sandbox).
  12. Interfaces() []*driverapi.Interface
  13. // Add an existing Interface to this sandbox. The operation will rename
  14. // from the Interface SrcName to DstName as it moves, and reconfigure the
  15. // interface according to the specified settings.
  16. AddInterface(*driverapi.Interface) error
  17. SetGateway(gw string) error
  18. SetGatewayIPv6(gw string) error
  19. }