github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/libnetwork/cluster/provider.go (about)

     1  package cluster
     2  
     3  import (
     4  	"github.com/docker/docker/api/types/network"
     5  	"golang.org/x/net/context"
     6  )
     7  
     8  // Provider provides clustering config details
     9  type Provider interface {
    10  	IsManager() bool
    11  	IsAgent() bool
    12  	GetLocalAddress() string
    13  	GetListenAddress() string
    14  	GetAdvertiseAddress() string
    15  	GetRemoteAddress() string
    16  	ListenClusterEvents() <-chan struct{}
    17  	AttachNetwork(string, string, []string) (*network.NetworkingConfig, error)
    18  	DetachNetwork(string, string) error
    19  	UpdateAttachment(string, string, *network.NetworkingConfig) error
    20  	WaitForDetachment(context.Context, string, string, string, string) error
    21  }