Package uk.co.ractf.polaris.node
Class ConsulNode
- java.lang.Object
-
- uk.co.ractf.polaris.node.ConsulNode
-
-
Constructor Summary
Constructors Constructor Description ConsulNode(java.util.Set<Runner<?>> runnerSet, java.util.Set<com.google.common.util.concurrent.Service> services, ClusterState clusterState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.dockerjava.api.model.AuthConfig
getAuthConfig()
Gets the docker registry auth config for the host.java.lang.String
getId()
Get the host's iduk.co.ractf.polaris.api.node.NodeInfo
getNodeInfo()
Gets aNodeInfo
object with the host's current statejava.util.List<java.lang.String>
getPodImages()
Gets a list of images currently stored on the nodejava.util.List<java.lang.String>
getRunners()
Gets a list of runners available on the nodevoid
restartInstance(uk.co.ractf.polaris.api.instance.Instance instance)
Restarts anInstance
void
setNodeInfo(uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
Sets the host's current statevoid
start()
void
stop()
-
-
-
Constructor Detail
-
ConsulNode
@Inject public ConsulNode(java.util.Set<Runner<?>> runnerSet, java.util.Set<com.google.common.util.concurrent.Service> services, ClusterState clusterState)
-
-
Method Detail
-
start
public void start()
- Specified by:
start
in interfaceio.dropwizard.lifecycle.Managed
-
stop
public void stop()
- Specified by:
stop
in interfaceio.dropwizard.lifecycle.Managed
-
getId
public java.lang.String getId()
Description copied from interface:Node
Get the host's id
-
getNodeInfo
public uk.co.ractf.polaris.api.node.NodeInfo getNodeInfo()
Description copied from interface:Node
Gets aNodeInfo
object with the host's current state- Specified by:
getNodeInfo
in interfaceNode
- Returns:
- host info
-
setNodeInfo
public void setNodeInfo(uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
Description copied from interface:Node
Sets the host's current state- Specified by:
setNodeInfo
in interfaceNode
- Parameters:
nodeInfo
-NodeInfo
-
restartInstance
public void restartInstance(uk.co.ractf.polaris.api.instance.Instance instance)
Description copied from interface:Node
Restarts anInstance
- Specified by:
restartInstance
in interfaceNode
- Parameters:
instance
- the instance
-
getAuthConfig
public com.github.dockerjava.api.model.AuthConfig getAuthConfig()
Description copied from interface:Node
Gets the docker registry auth config for the host.- Specified by:
getAuthConfig
in interfaceNode
- Returns:
- the auth config
-
getPodImages
public java.util.List<java.lang.String> getPodImages()
Description copied from interface:Node
Gets a list of images currently stored on the node- Specified by:
getPodImages
in interfaceNode
- Returns:
- list of images
-
getRunners
public java.util.List<java.lang.String> getRunners()
Description copied from interface:Node
Gets a list of runners available on the node- Specified by:
getRunners
in interfaceNode
- Returns:
- list of runners
-
-