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