Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller definition.
func NewController ¶
func NewController(srv *heartbeats.Service, logger *zap.Logger, p2pNetwork string) *Controller
NewController create a new controler.
func (*Controller) GetLastHeartbeats ¶
func (c *Controller) GetLastHeartbeats(ctx *fiber.Ctx) error
GetPhylaxSet godoc @Description Get heartbeats for phylaxs @Tags Phylax @ID phylaxs-hearbeats @Success 200 {object} HeartbeatsResponse @Failure 400 @Failure 500 @Router /v1/heartbeats [get]
type HeartbeatNetworkResponse ¶
type HeartbeatNetworkResponse struct { ID int64 `bson:"id" json:"id"` Height string `bson:"height" json:"height"` ContractAddress string `bson:"contractaddress" json:"contractAddress"` ErrorCount string `bson:"errorcount" json:"errorCount"` }
HeartbeatNetwork definition.
type HeartbeatResponse ¶
type HeartbeatResponse struct { VerifiedPhylaxAddr string `json:"verifiedPhylaxAddr"` P2PNodeAddr string `json:"p2pNodeAddr"` RawHeartbeat *RawHeartbeat `json:"rawHeartbeat"` }
type HeartbeatsResponse ¶
type HeartbeatsResponse struct {
Heartbeats []*HeartbeatResponse `json:"entries"`
}
HeartbeatsResponse response.
type RawHeartbeat ¶
type RawHeartbeat struct { NodeName string `json:"nodeName"` Counter string `json:"counter"` Timestamp string `json:"timestamp"` Networks []*HeartbeatNetworkResponse `json:"networks"` Version string `json:"version"` PhylaxAddr string `json:"phylaxAddr"` BootTimestamp string `json:"bootTimestamp"` Features []string `json:"features"` }
Click to show internal directories.
Click to hide internal directories.