telemetry

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2021 ChainSafe Systems (ON) Corp. This file is part of gossamer.

The gossamer library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The gossamer library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the gossamer library. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionData

type ConnectionData struct {
	Authority     bool
	Chain         string
	GenesisHash   string
	SystemName    string
	NodeName      string
	SystemVersion string
	NetworkID     string
	StartTime     string
}

ConnectionData struct to hold connection data

type Handler

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

Handler struct for holding telemetry related things

func GetInstance

func GetInstance() *Handler

GetInstance singleton pattern to for accessing TelemetryHandler

func (*Handler) AddConnections

func (h *Handler) AddConnections(conns []*genesis.TelemetryEndpoint)

AddConnections adds connections to telemetry sever

func (*Handler) SendBlockImport

func (h *Handler) SendBlockImport(bestHash string, height *big.Int)

SendBlockImport sends block imported message to telemetry connection

func (*Handler) SendConnection

func (h *Handler) SendConnection(data *ConnectionData)

SendConnection sends connection request message to telemetry connection

type MyJSONFormatter

type MyJSONFormatter struct {
}

MyJSONFormatter struct for defining JSON Formatter

func (*MyJSONFormatter) Format

func (f *MyJSONFormatter) Format(entry *log.Entry) ([]byte, error)

Format function for handling JSON formatting, this overrides default logging formatter to remove

log level, line number and timestamp

Jump to

Keyboard shortcuts

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