dash

package
v0.0.0-...-b8b03c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Content embed.FS
)

Functions

func Serve

func Serve(port string, updates chan *ChainStatus, logs chan LogMessage, hideLogs bool)

Types

type CacheHandler

type CacheHandler struct{}

CacheHandler implements the Handler interface with a Cache-Control set on responses

func (CacheHandler) ServeHTTP

func (ch CacheHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type ChainStatus

type ChainStatus struct {
	MsgType      string `json:"msgType"`
	Name         string `json:"name"`
	ChainId      string `json:"chain_id"`
	Moniker      string `json:"moniker"`
	Bonded       bool   `json:"bonded"`
	Jailed       bool   `json:"jailed"`
	Tombstoned   bool   `json:"tombstoned"`
	Missed       int64  `json:"missed"`
	Window       int64  `json:"window"`
	Nodes        int    `json:"nodes"`
	HealthyNodes int    `json:"healthy_nodes"`
	ActiveAlerts int    `json:"active_alerts"`
	Height       int64  `json:"height"`
	LastError    string `json:"last_error"`

	Blocks []int `json:"blocks"`
}

type LogMessage

type LogMessage struct {
	MsgType string `json:"msgType"`
	Ts      int64  `json:"ts"`
	Msg     string `json:"msg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL