Skip to content

Commit

Permalink
Merge pull request #5 from gadost/fixes
Browse files Browse the repository at this point in the history
fixes
gadost authored Jun 16, 2022
2 parents d10ce89 + f1e9675 commit a4e3117
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 1 addition & 6 deletions conf/conf.go
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ type Nodes struct {
}
Node []Node
}

type Node struct {
Client *http.HTTP
Role string
@@ -109,11 +110,6 @@ func (n *Nodes) Reset() {
*n = *zNodes
}

//func init() {
// flag.StringVar(&ConfdPath, "confd", userHome+"/.telescope/conf.d", "path to configs dir")
// flag.Parse()
//}

//Check existence of confd folder
func ConfLoad(c string) (ChainsConfig, []string) {
ConfdPath = c
@@ -130,7 +126,6 @@ func ConfLoad(c string) (ChainsConfig, []string) {

// buildConf load parsed config to struct
func buildConf(files []fs.FileInfo) {

for _, f := range files {
switch f.Name() {
case mainConfigName:
10 changes: 8 additions & 2 deletions event/event.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ type Event struct {
}

func New() *Event {

return &Event{}
}

@@ -87,7 +86,14 @@ func Unknown(s string) string {
}

// HealthCheck check node health
func HealthCheck(moniker, network, rpc string, counter int, timeDelta time.Duration, lastSeenAt time.Time, lastStatus bool) (bool, bool) {
func HealthCheck(
moniker,
network,
rpc string,
counter int,
timeDelta time.Duration,
lastSeenAt time.Time,
lastStatus bool) (bool, bool) {
var resolved = false
if counter == 5 {
alert.NewAlertAccessDelays(Unknown(moniker), Unknown(network), rpc).Send()

0 comments on commit a4e3117

Please sign in to comment.