Documentation
¶
Index ¶
- func CreateConsulRegionClient(c *config.Config, region string) (*api.Client, error)
- type ConsulCluster
- type ConsulClusterBroadcastChannels
- type ConsulConnection
- func (c *ConsulConnection) Debugf(format string, args ...interface{})
- func (c *ConsulConnection) Errorf(format string, args ...interface{})
- func (c *ConsulConnection) Handle()
- func (c *ConsulConnection) Infof(format string, args ...interface{})
- func (c *ConsulConnection) Warningf(format string, args ...interface{})
- type ConsulHub
- type ConsulInternalNode
- type ConsulInternalNodes
- type ConsulInternalService
- type ConsulInternalServices
- type ConsulRegion
- type ConsulRegionBroadcastChannels
- type ConsulRegionChannels
- type ConsulRegionClients
- type ConsulService
- type ConsulServices
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsulCluster ¶
type ConsulCluster struct { ClusterClient *api.Client RegionChannels *ConsulRegionChannels RegionClients *ConsulRegionClients }
ConsulCluster derp
func NewConsulCluster ¶
func NewConsulCluster(clusterClient *api.Client, clients *ConsulRegionClients, channels *ConsulRegionChannels) *ConsulCluster
NewConsulCluster ...
type ConsulClusterBroadcastChannels ¶
type ConsulClusterBroadcastChannels struct {
// contains filtered or unexported fields
}
ConsulClusterBroadcastChannels ...
type ConsulConnection ¶
ConsulConnection monitors the websocket connection. It processes any action received on the websocket and sends out actions on Consul state changes. It maintains a set to keep track of the running watches.
func NewConsulConnection ¶
func NewConsulConnection(hub *ConsulHub, socket *websocket.Conn, consulRegion *ConsulRegion, channels *ConsulRegionBroadcastChannels) *ConsulConnection
NewConsulConnection creates a new connection.
func (*ConsulConnection) Debugf ¶
func (c *ConsulConnection) Debugf(format string, args ...interface{})
Debugf is a stupid wrapper for logger.Debugf
func (*ConsulConnection) Errorf ¶
func (c *ConsulConnection) Errorf(format string, args ...interface{})
Errorf is a stupid wrapper for logger.Errorf
func (*ConsulConnection) Handle ¶
func (c *ConsulConnection) Handle()
Handle monitors the websocket connection for incoming actions. It sends out actions on state changes.
func (*ConsulConnection) Infof ¶
func (c *ConsulConnection) Infof(format string, args ...interface{})
Infof is a stupid wrapper for logger.Infof
func (*ConsulConnection) Warningf ¶
func (c *ConsulConnection) Warningf(format string, args ...interface{})
Warningf is a stupid wrapper for logger.Warningf
type ConsulHub ¶
type ConsulHub struct {
// contains filtered or unexported fields
}
ConsulHub keeps track of all the websocket connections and sends state updates from Nomad to all connections.
func InitializeConsul ¶
InitializeConsul ...
func NewConsulHub ¶
func NewConsulHub(cluster *ConsulCluster) *ConsulHub
NewConsulHub initializes a new hub.
type ConsulInternalNode ¶
type ConsulInternalNode struct { Node string Address string TaggedAddresses map[string]string Services []*api.AgentService Checks []*api.AgentCheck }
ConsulInternalNode ...
type ConsulInternalService ¶
type ConsulInternalService struct { Name string Nodes []string ChecksPassing int64 ChecksWarning int64 ChecksCritical int64 }
ConsulInternalService ...
type ConsulInternalServices ¶
type ConsulInternalServices []*ConsulInternalService
ConsulInternalServices ...
type ConsulRegion ¶
type ConsulRegion struct { Config *config.Config Client *api.Client // contains filtered or unexported fields }
ConsulRegion keeps track of the ConsulRegion state. It monitors changes to allocations, evaluations, jobs and nodes and broadcasts them to all connected websockets. It also exposes an API client for the ConsulRegion server.
func NewConsulRegion ¶
func NewConsulRegion(c *config.Config, client *api.Client, channels *ConsulRegionBroadcastChannels) (*ConsulRegion, error)
NewConsulRegion configures the Consul API client and initializes the internal state.
type ConsulRegionBroadcastChannels ¶
type ConsulRegionBroadcastChannels struct {
// contains filtered or unexported fields
}
ConsulRegionBroadcastChannels contains all the channels for resources hashi-ui automatically maintain active lists of
type ConsulRegionChannels ¶
type ConsulRegionChannels map[string]*ConsulRegionBroadcastChannels
ConsulRegionChannels ...
type ConsulRegionClients ¶
type ConsulRegionClients map[string]*ConsulRegion
ConsulRegionClients ...
type ConsulService ¶
ConsulService ...