Class ConsulNode

  • All Implemented Interfaces:
    io.dropwizard.lifecycle.Managed, Node

    public class ConsulNode
    extends java.lang.Object
    implements Node, io.dropwizard.lifecycle.Managed
    • 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 id
      uk.co.ractf.polaris.api.node.NodeInfo getNodeInfo()
      Gets a NodeInfo object with the host's current state
      java.util.List<java.lang.String> getPodImages()
      Gets a list of images currently stored on the node
      java.util.List<java.lang.String> getRunners()
      Gets a list of runners available on the node
      void restartInstance​(uk.co.ractf.polaris.api.instance.Instance instance)
      Restarts an Instance
      void setNodeInfo​(uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
      Sets the host's current state
      void start()  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface io.dropwizard.lifecycle.Managed
      • stop

        public void stop()
        Specified by:
        stop in interface io.dropwizard.lifecycle.Managed
      • getId

        public java.lang.String getId()
        Description copied from interface: Node
        Get the host's id
        Specified by:
        getId in interface Node
        Returns:
        the host's id
      • getNodeInfo

        public uk.co.ractf.polaris.api.node.NodeInfo getNodeInfo()
        Description copied from interface: Node
        Gets a NodeInfo object with the host's current state
        Specified by:
        getNodeInfo in interface Node
        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 interface Node
        Parameters:
        nodeInfo - NodeInfo
      • restartInstance

        public void restartInstance​(uk.co.ractf.polaris.api.instance.Instance instance)
        Description copied from interface: Node
        Restarts an Instance
        Specified by:
        restartInstance in interface Node
        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 interface Node
        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 interface Node
        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 interface Node
        Returns:
        list of runners