Expose Endpoint IDs in their public interface.

This commit is contained in:
Tom Wilkie 2015-04-17 14:31:29 +00:00
parent 6e4b930357
commit d449658d91
1 changed files with 7 additions and 0 deletions

View File

@ -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