Documentation ¶
Index ¶
- type ClusterService
- func (service *ClusterService) Create(advertiseAddr string, joinAddr []string, ...) error
- func (service *ClusterService) GetMemberByNodeName(nodeName string) *agent.ClusterMember
- func (service *ClusterService) GetMemberByRole(role agent.DockerNodeRole) *agent.ClusterMember
- func (service *ClusterService) GetMemberWithEdgeKeySet() *agent.ClusterMember
- func (service *ClusterService) GetRuntimeConfiguration() *agent.RuntimeConfig
- func (service *ClusterService) Leave()
- func (service *ClusterService) Members() []agent.ClusterMember
- func (service *ClusterService) UpdateRuntimeConfiguration(runtimeConfiguration *agent.RuntimeConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterService ¶
type ClusterService struct {
// contains filtered or unexported fields
}
ClusterService is a service used to manage cluster related actions such as joining the cluster, retrieving members in the clusters...
func NewClusterService ¶
func NewClusterService(runtimeConfiguration *agent.RuntimeConfig) *ClusterService
NewClusterService returns a pointer to a ClusterService.
func (*ClusterService) Create ¶
func (service *ClusterService) Create(advertiseAddr string, joinAddr []string, probeTimeout, probeInterval time.Duration) error
Create will create the agent configuration and automatically join the cluster.
func (*ClusterService) GetMemberByNodeName ¶
func (service *ClusterService) GetMemberByNodeName(nodeName string) *agent.ClusterMember
GetMemberByNodeName will return the first member with the specified node name.
func (*ClusterService) GetMemberByRole ¶
func (service *ClusterService) GetMemberByRole(role agent.DockerNodeRole) *agent.ClusterMember
GetMemberByRole will return the first member with the specified role.
func (*ClusterService) GetMemberWithEdgeKeySet ¶
func (service *ClusterService) GetMemberWithEdgeKeySet() *agent.ClusterMember
GetMemberWithEdgeKeySet will return the first member with the EdgeKeySet tag set.
func (*ClusterService) GetRuntimeConfiguration ¶
func (service *ClusterService) GetRuntimeConfiguration() *agent.RuntimeConfig
GetRuntimeConfiguration returns the runtimeConfiguration associated to the service
func (*ClusterService) Members ¶
func (service *ClusterService) Members() []agent.ClusterMember
Members returns the list of cluster members.
func (*ClusterService) UpdateRuntimeConfiguration ¶
func (service *ClusterService) UpdateRuntimeConfiguration(runtimeConfiguration *agent.RuntimeConfig) error
UpdateRuntimeConfiguration propagate the new runtimeConfiguration to the cluster