Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wlsaud619 committed Oct 1, 2019
1 parent ebd0573 commit 66100f4
Show file tree
Hide file tree
Showing 13 changed files with 265 additions and 13 deletions.
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ network = "cosmos"

# RPC-Server
[rpc]
address = "0:26657"
address = "113.209.186.219:26657"

# Rest-server
[rest_server]
address = "0:1317"
address = "113.209.186.219:1317"

[validator_info]
operatorAddress = "cosmosvaloper14l0fp639yudfl46zauvv8rkzjgd4u0zk2aseys"
Expand Down
16 changes: 9 additions & 7 deletions function/commit/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import (
t "github.com/node-a-team/cosmos-validator_exporter/types"

"encoding/json"
"fmt"
"os/exec"
)

func CommitStatus(blockHeight int) t.CommitStatus {

var commitStatus t.CommitStatus

cmd := "curl -s -XGET " + t.RpcServer + "/commit?height=" + fmt.Sprint(blockHeight) + " -H \"accept:application/json\""
out, _ := exec.Command("/bin/bash", "-c", cmd).Output()
json.Unmarshal(out, &commitStatus)
var blockHeightInt64 int64 = int64(blockHeight)

info, _ := t.Client.Commit(&blockHeightInt64)
infoMarshal, _ := json.Marshal(info)
json.Unmarshal(infoMarshal, &commitStatus)

return commitStatus

Expand All @@ -25,7 +25,8 @@ func ValidatorPrecommitStatus(commitStatus t.CommitStatus, consHexAddr string) i
// validatorCommitStatus(0: false, 1 : true)
validatorCommitStatus := 0

precommitData := commitStatus.Result.Signed_header.Commit.Precommits
precommitData := commitStatus.Signed_header.Commit.Precommits
// precommitData := commitStatus.Result.Signed_header.Commit.Precommits

for _, value := range precommitData {

Expand All @@ -42,7 +43,8 @@ func PrecommitRate(commitStatus t.CommitStatus) float64 {
// validatorCommitStatus(0: false, 1 : true)
precommitRate := 0.0

precommitData := commitStatus.Result.Signed_header.Commit.Precommits
precommitData := commitStatus.Signed_header.Commit.Precommits
// precommitData := commitStatus.Result.Signed_header.Commit.Precommits
totalCount, precommitCount := len(precommitData), len(precommitData)

for _, value := range precommitData {
Expand Down
67 changes: 67 additions & 0 deletions function/commit/commit.go_origin
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package commit

import (
t "github.com/node-a-team/cosmos-validator_exporter/types"

"encoding/json"
"fmt"
// "os/exec"
)

func CommitStatus(blockHeight int) t.CommitStatus {

var commitStatus t.CommitStatus

var blockHeightInt64 int64 = int64(blockHeight)

info, _ := t.Client.Commit(&blockHeightInt64)
result, _ := json.Marshal(info)


// cmd := "curl -s -XGET " + t.RpcServer + "/commit?height=" + fmt.Sprint(blockHeight) + " -H \"accept:application/json\""
// out, _ := exec.Command("/bin/bash", "-c", cmd).Output()
// json.Unmarshal(out, &commitStatus)

json.Unmarshal(result, &commitStatus)
fmt.Println(commitStatus)

return commitStatus

}

func ValidatorPrecommitStatus(commitStatus t.CommitStatus, consHexAddr string) int {

// validatorCommitStatus(0: false, 1 : true)
validatorCommitStatus := 0

precommitData := commitStatus.Result.Signed_header.Commit.Precommits

for _, value := range precommitData {

if value.Validator_address == consHexAddr {
validatorCommitStatus = 1
}
}

return validatorCommitStatus
}

func PrecommitRate(commitStatus t.CommitStatus) float64 {

// validatorCommitStatus(0: false, 1 : true)
precommitRate := 0.0

precommitData := commitStatus.Result.Signed_header.Commit.Precommits
totalCount, precommitCount := len(precommitData), len(precommitData)

for _, value := range precommitData {

if value.Validator_address == "" {
precommitCount--
}
}

precommitRate = float64(precommitCount) / float64(totalCount)

return precommitRate
}
19 changes: 19 additions & 0 deletions function/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"time"
"os"
"os/exec"
"log"

"github.com/BurntSushi/toml"
Expand All @@ -22,6 +23,8 @@ func Init() {
t.RpcServer = config.Rpc.Address
t.RestServer = config.Rest_server.Address

serverChecker()

t.OperatorAddr = config.Validator_info.OperatorAddress
t.ExporterListenPort = config.Option.ExporterListenPort
t.OutputPrint = config.Option.OutputPrint
Expand Down Expand Up @@ -63,3 +66,19 @@ func readConfig() t.Config {
return config

}

func serverChecker() {

fmt.Println("serverChecker")

cmd := "curl -s -XGET " + t.RpcServer + "/abci_info" +" -H \"accept:application/json\""
out, _ := exec.Command("/bin/bash", "-c", cmd).Output()
fmt.Println(string(out))

cmd = "curl -s -XGET " + t.RestServer + "/node_info" +" -H \"accept:application/json\""
out, _ = exec.Command("/bin/bash", "-c", cmd).Output()
fmt.Println(string(out))



}
65 changes: 65 additions & 0 deletions function/config/config.go_origin
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package config

import (

t "github.com/node-a-team/cosmos-validator_exporter/types"

"fmt"
"time"
"os"
"log"

"github.com/BurntSushi/toml"
)


func Init() {

var config = readConfig()

fmt.Printf("\033[7m##### %s #####\033[0m\n", config.Title)

t.RpcServer = config.Rpc.Address
t.RestServer = config.Rest_server.Address

t.OperatorAddr = config.Validator_info.OperatorAddress
t.ExporterListenPort = config.Option.ExporterListenPort
t.OutputPrint = config.Option.OutputPrint
t.Bech32MainPrefix = config.Network

fmt.Println("\n[ Your Info ]")
fmt.Println("- Network:", config.Network)
fmt.Println("- RPC Server Address:", config.Rpc.Address)
fmt.Println("- Rest Server Address:", config.Rest_server.Address)
fmt.Println("- Validator Operator Address:", config.Validator_info.OperatorAddress)
fmt.Println("- Exporter Listen Port:", config.Option.ExporterListenPort)
fmt.Printf("- Output Print: %v\n\n", config.Option.OutputPrint)


fmt.Printf("\033[32m## Start Exporter\033[0m\n\n")

fmt.Printf("\033[34m## This exporter was created by \"Node A-Team\"\n")
fmt.Printf("## Validator: https://www.mintscan.io/validators/cosmosvaloper14l0fp639yudfl46zauvv8rkzjgd4u0zk2aseys\n")
fmt.Printf("## Git: https://github.com/node-a-team/cosmos-validator_exporter.git\033[0m\n\n")

time.Sleep(1*time.Second)
}

func readConfig() t.Config {

var configfile string = "config.toml"
var config t.Config

_, err := os.Stat(configfile)

if err != nil {
log.Fatal("Config file is missing: ", configfile)
}

if _, err := toml.DecodeFile(configfile, &config); err != nil {
log.Fatal(err)
}

return config

}
2 changes: 2 additions & 0 deletions function/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func Exporter() {
mintingParamsStatus := minting.MintingParamsStatus()



// validators
validatorCountOrigin, validatorsetsStatus := validators.ValidatorsetsStatus()
validatorsStatus := validators.ValidatorsStatus()
Expand Down Expand Up @@ -111,6 +112,7 @@ func Exporter() {
proposerMoniker := block.ProposerMoniker(blockStatus.Block.Header.Proposer_address, validatorsetsStatus, validatorsStatus)
proposerWalletAccountNumber := float64(0.0)


// staking
notBondedTokensOrigin, bondedTokensOrigin := staking.GetStakingPool()
totalBondedTokensOrigin := notBondedTokensOrigin + bondedTokensOrigin
Expand Down
28 changes: 28 additions & 0 deletions function/websocket/websocket.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package websocket

import (
t "github.com/node-a-team/cosmos-validator_exporter/types"
tmclient "github.com/tendermint/tendermint/rpc/client"
// "encoding/json"
"fmt"
// "os/exec"
// "strconv"

)


func OpenSocket() {
t.Client = tmclient.NewHTTP("tcp://"+t.RpcServer, "/websocket")

err := t.Client.Start()
if err != nil {
// handle error
fmt.Println("######## RPC/websockets Connection Error ########")
}
defer t.Client.Stop()

fmt.Println("####### RPC/websockets Connect -> tcp://"+t.RpcServer +" ########")
}



19 changes: 19 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw=
github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE=
Expand All @@ -21,27 +22,33 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gorilla/websocket v1.2.0 h1:VJtLvh6VQym50czpZzx07z/kw9EgAxI3x1ZB8taTMQQ=
github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
Expand All @@ -57,6 +64,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/libp2p/go-buffer-pool v0.0.1 h1:9Rrn/H46cXjaA2HQ5Y8lyhOS1NhTkZ4yuEs2r3Eechg=
github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
Expand Down Expand Up @@ -90,7 +98,9 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFEuGCb2mBZbBb24RdNRL08b/wb+xBOYpuk=
github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI=
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4=
Expand All @@ -104,20 +114,25 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw=
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk=
github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso=
github.com/tendermint/tendermint v0.32.3 h1:GEnWpGQ795h5oTFNbfBLsY0LW/CW2j6p6HtiYNfxsgg=
github.com/tendermint/tendermint v0.32.3/go.mod h1:ZK2c29jl1QRYznIRyRWRDsmm1yvtPzBRT00x4t1JToY=
github.com/tendermint/tm-db v0.1.1 h1:G3Xezy3sOk9+ekhjZ/kjArYIs1SmwV+1OUgNkj7RgV0=
github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -128,14 +143,18 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA=
google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw=
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

t "github.com/node-a-team/cosmos-validator_exporter/types"
config "github.com/node-a-team/cosmos-validator_exporter/function/config"
websocket "github.com/node-a-team/cosmos-validator_exporter/function/websocket"
exporter "github.com/node-a-team/cosmos-validator_exporter/function/exporter"

"github.com/prometheus/client_golang/prometheus/promhttp"
Expand All @@ -23,6 +24,7 @@ func main() {
http.Handle("/metrics", promhttp.Handler())

config.Init()
websocket.OpenSocket()

go exporter.Exporter()

Expand Down
Binary file added types/.block.go.swp
Binary file not shown.
Loading

0 comments on commit 66100f4

Please sign in to comment.