mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
eosapi/types.go: Adding Health and Service structs.
This commit is contained in:
parent
2e6ebe28c0
commit
e6115260ef
1 changed files with 13 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
package eosapi;
|
||||
|
||||
import "time";
|
||||
import "time"
|
||||
|
||||
// get_info format (not all fields).
|
||||
type Info struct {
|
||||
|
|
@ -9,3 +9,15 @@ type Info struct {
|
|||
HeadBlockNum int64 `json:"head_block_num"`
|
||||
HeadBlockTime time.Time `json:"head_block_time"`
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
Name string `json:"service"`
|
||||
Status string `json:"status"`
|
||||
Data map[string]interface{} `json:"service_data"`
|
||||
Time int64 `json:"time"` // unix timestamp.
|
||||
}
|
||||
|
||||
type Health struct {
|
||||
VersionHash string `json:"version_hash"`
|
||||
Health []Service `json:"health"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue