1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #61 from tomwilkie/expose_endpoint_id

Expose Endpoint IDs in their public interface.
This commit is contained in:
Madhu Venugopal 2015-04-17 13:31:57 -07:00
commit 3debfb30b6

View file

@ -77,6 +77,9 @@ type Network interface {
// Endpoint represents a logical connection between a network and a sandbox. // Endpoint represents a logical connection between a network and a sandbox.
type Endpoint interface { type Endpoint interface {
// A system generated id for this network.
ID() string
// Delete endpoint. // Delete endpoint.
Delete() error Delete() error
} }
@ -237,6 +240,10 @@ func (n *network) CreateEndpoint(name string, sboxKey string, options interface{
return ep, sinfo, nil return ep, sinfo, nil
} }
func (ep *endpoint) ID() string {
return string(ep.id)
}
func (ep *endpoint) Delete() error { func (ep *endpoint) Delete() error {
var err error var err error