Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Socket *websocket.Conn Send chan *SendMessage Received chan *ReceiveMessage StopHostPolling chan bool }
type ErrorMessage ¶
type HostsController ¶
type HostsController struct { Info *config.DashboardInfo Drivers map[string]*driver.Driver // ReadOnlyHosts : restrict pinging every other server except these ReadOnlyHosts []string // ClientConnected : shows that a client is connected ClientConnected bool Client chan *Client Received chan *ReceiveMessage StopPolling chan bool // contains filtered or unexported fields }
func NewHostsController ¶
func NewHostsController(cfg *config.Config) *HostsController
NewHostsController : initialze host controller with config file
func (*HostsController) Poll ¶
func (hosts *HostsController) Poll(client *Client)
func (*HostsController) Run ¶
func (hosts *HostsController) Run()
func (*HostsController) ServeHTTP ¶
func (hosts *HostsController) ServeHTTP(w http.ResponseWriter, req *http.Request)
type ReceiveMessage ¶
type ReceiveMessage struct {
FilterBy string
}
ReceiveMessage : specify the host to filter by
type SendMessage ¶
type SendMessage struct { Error bool Message interface{} }
Click to show internal directories.
Click to hide internal directories.