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:
commit
3debfb30b6
1 changed files with 7 additions and 0 deletions
|
@ -77,6 +77,9 @@ type Network interface {
|
|||
|
||||
// Endpoint represents a logical connection between a network and a sandbox.
|
||||
type Endpoint interface {
|
||||
// A system generated id for this network.
|
||||
ID() string
|
||||
|
||||
// Delete endpoint.
|
||||
Delete() error
|
||||
}
|
||||
|
@ -237,6 +240,10 @@ func (n *network) CreateEndpoint(name string, sboxKey string, options interface{
|
|||
return ep, sinfo, nil
|
||||
}
|
||||
|
||||
func (ep *endpoint) ID() string {
|
||||
return string(ep.id)
|
||||
}
|
||||
|
||||
func (ep *endpoint) Delete() error {
|
||||
var err error
|
||||
|
||||
|
|
Loading…
Reference in a new issue