From 9d600c0870b688cc5743f23284fbeb0f01f9e2f4 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Fri, 17 Apr 2015 14:31:29 +0000 Subject: [PATCH] Expose Endpoint IDs in their public interface. --- network.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/network.go b/network.go index ee6836c..d12a135 100644 --- a/network.go +++ b/network.go @@ -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