mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-10-03 23:38:27 +00:00
Merge pull request #61 from tomwilkie/expose_endpoint_id
Expose Endpoint IDs in their public interface.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user