Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Port string Bind string AdminPort string WebSocket string Suspend int Ticker int MaxResponseTime int64 SocketPath string Slack slackConfig Telegram telegramConfig Servers []server }
Config is struct for config.toml file
type JSONRPCMessage ¶
type JSONRPCMessage struct { Version string `json:"jsonrpc"` ID int `json:"id,omitempty"` Method string `json:"method,omitempty"` Params []json.RawMessage `json:"params,omitempty"` Error *jsonError `json:"error,omitempty"` Result json.RawMessage `json:"result,omitempty"` }
JSONRPCMessage structure for mapping request from ethclient
func (JSONRPCMessage) GetStringParams ¶
func (req JSONRPCMessage) GetStringParams(index int) (string, error)
GetStringParams return index string from params field of request
type Upstream ¶
type Upstream struct { Port uint16 `json:"-"` TimeUpdate int64 `json:"lastupdate"` Weight uint8 `json:"weight"` Backup bool `json:"-"` Host string `json:"-"` Hostname string `json:"hostname"` Target string `json:"url"` Token string `json:"-"` LastBlock int64 `json:"digblock"` ResponseTime int64 `json:"responsetime"` HexLastBlock string `json:"lastblock"` State string `json:"-"` RealState string `json:"status"` FSM *fsm.FSM `json:"-"` Mutex sync.Mutex `json:"-"` }
Upstream is host for reverseproxy request from ethclients
func NewUpstream ¶
NewUpstream is constructor for Upstream
func (*Upstream) GetTargetLastBlock ¶
func (*Upstream) UpdateLastBlock ¶
UpdateLastBlock function for update some fileds in Upstrea: LastBlock value, TimeUpdate value and state to UP
Click to show internal directories.
Click to hide internal directories.