mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: consolidate node options with their methods
Move them together, as we did for most of the other options. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -9,6 +9,9 @@ import (
|
||||
"github.com/moby/moby/api/types/swarm"
|
||||
)
|
||||
|
||||
// NodeInspectOptions holds parameters to inspect nodes with.
|
||||
type NodeInspectOptions struct{}
|
||||
|
||||
type NodeInspectResult struct {
|
||||
Node swarm.Node
|
||||
Raw []byte
|
||||
|
||||
@@ -8,6 +8,11 @@ import (
|
||||
"github.com/moby/moby/api/types/swarm"
|
||||
)
|
||||
|
||||
// NodeListOptions holds parameters to list nodes with.
|
||||
type NodeListOptions struct {
|
||||
Filters Filters
|
||||
}
|
||||
|
||||
type NodeListResult struct {
|
||||
Items []swarm.Node
|
||||
}
|
||||
|
||||
@@ -5,6 +5,10 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// NodeRemoveOptions holds parameters to remove nodes with.
|
||||
type NodeRemoveOptions struct {
|
||||
Force bool
|
||||
}
|
||||
type NodeRemoveResult struct{}
|
||||
|
||||
// NodeRemove removes a Node.
|
||||
|
||||
@@ -3,8 +3,16 @@ package client
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
|
||||
"github.com/moby/moby/api/types/swarm"
|
||||
)
|
||||
|
||||
// NodeUpdateOptions holds parameters to update nodes with.
|
||||
type NodeUpdateOptions struct {
|
||||
Version swarm.Version
|
||||
Node swarm.NodeSpec
|
||||
}
|
||||
|
||||
type NodeUpdateResult struct{}
|
||||
|
||||
// NodeUpdate updates a Node.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package client
|
||||
|
||||
// NodeInspectOptions holds parameters to inspect nodes with.
|
||||
type NodeInspectOptions struct{}
|
||||
@@ -1,6 +0,0 @@
|
||||
package client
|
||||
|
||||
// NodeListOptions holds parameters to list nodes with.
|
||||
type NodeListOptions struct {
|
||||
Filters Filters
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package client
|
||||
|
||||
// NodeRemoveOptions holds parameters to remove nodes with.
|
||||
type NodeRemoveOptions struct {
|
||||
Force bool
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package client
|
||||
|
||||
import "github.com/moby/moby/api/types/swarm"
|
||||
|
||||
// NodeUpdateOptions holds parameters to update nodes with.
|
||||
type NodeUpdateOptions struct {
|
||||
Version swarm.Version
|
||||
Node swarm.NodeSpec
|
||||
}
|
||||
Reference in New Issue
Block a user