Expose Endpoint IDs in their public interface.
This commit is contained in:
parent
6e4b930357
commit
d449658d91
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue