messaging

package
v0.0.0-...-6efaf66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoCheck

func DoCheck(slackApi *slack.Client, channel string, ips []string)

DoCheck - check blockchain status of nodes

func DoPing

func DoPing(ips []string)

DoPing - ping list of nodes

func DoVersionCheck

func DoVersionCheck(slackApi *slack.Client, channel string, ips []string)

DoVersionCheck - check version/protocol versions of nodes

func InitSlack

func InitSlack(token string) *slack.Client

InitSlack - initiate Slack API

func PostMessage

func PostMessage(slackAPI *slack.Client, message string, channel string)

PostMessage - sends a message to Slack channel

func PostOddNodesReport

func PostOddNodesReport(slackAPI *slack.Client, channel string, nodes OddNodes)

PostOddNodesReport - posts report containing all nodes with differences in blockchain status

func PostVersionMismatchReport

func PostVersionMismatchReport(slackAPI *slack.Client, channel string, nodes MismatchVeresionNodes)

PostVersionMismatchReport - posts report containing all nodes with differences daemon or protocol version

func ReadChannels

func ReadChannels(slackAPI *slack.Client)

ReadChannels - get Slack channels list

Types

type Check

type Check struct {
	// contains filtered or unexported fields
}

Check - blockchain status check payload

type MismatchVeresionNodes

type MismatchVeresionNodes struct {
	RespondedWithError            []string
	HaveDifferentVersions         map[int64][]string
	HaveDifferentProtocolVersions map[int64][]string
	NewestVersion                 int64
	NewestProtocolVersion         int64
}

MismatchVeresionNodes - datatype for storing info about nodes with mismatches in version/protocol version

type OddNodes

type OddNodes struct {
	RespondedWithError           []string
	HeadersAndBlocksDontMatch    []string
	HaveDifferentNumberOfHeaders map[int32][]string
	HaveDifferentNumberOfBlocks  map[int32][]string
	HaveDifferentDifficulty      map[float64][]string
	HaveDifferentChainwork       map[string][]string
	HaveDifferentBestBlockHash   map[string][]string
}

OddNodes - datatype for storing info about nodes with mismatches in blockchain state

type Ping

type Ping struct {
	// contains filtered or unexported fields
}

Ping - ping payload

type VersionCheck

type VersionCheck struct {
	// contains filtered or unexported fields
}

VersionCheck - version check payload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL