2016-05-24 16:17:19 -07:00
|
|
|
package cluster
|
|
|
|
|
2016-08-22 18:36:12 -07:00
|
|
|
import (
|
2016-09-07 13:32:35 -07:00
|
|
|
"github.com/docker/docker/api/types/network"
|
2016-08-22 18:36:12 -07:00
|
|
|
"golang.org/x/net/context"
|
|
|
|
)
|
|
|
|
|
2016-05-24 16:17:19 -07:00
|
|
|
// Provider provides clustering config details
|
|
|
|
type Provider interface {
|
|
|
|
IsManager() bool
|
|
|
|
IsAgent() bool
|
2016-07-19 18:17:30 -07:00
|
|
|
GetLocalAddress() string
|
2016-09-22 11:38:35 -07:00
|
|
|
GetListenAddress() string
|
2016-07-19 18:17:30 -07:00
|
|
|
GetAdvertiseAddress() string
|
2016-05-24 16:17:19 -07:00
|
|
|
GetRemoteAddress() string
|
|
|
|
ListenClusterEvents() <-chan struct{}
|
2016-08-22 18:36:12 -07:00
|
|
|
AttachNetwork(string, string, []string) (*network.NetworkingConfig, error)
|
|
|
|
DetachNetwork(string, string) error
|
|
|
|
UpdateAttachment(string, string, *network.NetworkingConfig) error
|
2016-08-31 12:22:36 -07:00
|
|
|
WaitForDetachment(context.Context, string, string, string, string) error
|
2016-05-24 16:17:19 -07:00
|
|
|
}
|