internal

package
v0.0.0-...-8d2f687 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package internal contains all logic for monitoring service

Package internal contains all logic for monitoring service

Package internal contains all logic for monitoring service

Package internal contains all logic for monitoring service

Package internal contains all logic for monitoring service

Package internal contains all logic for monitoring service

Index

Constants

This section is empty.

Variables

View Source
var BridgeAddresses = map[network]string{
	// contains filtered or unexported fields
}
View Source
var ProxyUrls = map[network]string{
	// contains filtered or unexported fields
}

ProxyUrls for proxy urls

View Source
var RelayURLS = map[network]string{
	// contains filtered or unexported fields
}

RelayURLS for relay urls

View Source
var SubstrateURLs = map[network][]string{
	// contains filtered or unexported fields
}

SubstrateURLs for substrate urls

Functions

func ParseEnv

func ParseEnv(content string) (config, error)

ParseEnv parses string content to monitor configs

func ParseJSONIntoWallets

func ParseJSONIntoWallets(content []byte) (w wallets, err error)

ParseJSONIntoWallets parses bytes content to wallets

func ReadFile

func ReadFile(path string) ([]byte, error)

func TryDecodeBase64OrElse

func TryDecodeBase64OrElse(possiblyEncoded string) []byte

TryDecodeBase64OrElse tries to decode a possibly base64 encoded string into a byte array or returns the string as a byte array assuming it was decoded already

Types

type GridProxyClient

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

GridProxyClient struct

func NewGridProxyClient

func NewGridProxyClient(endpoint string) (*GridProxyClient, error)

NewGridProxyClient generates a new proxy client for endpoint

func (GridProxyClient) Ping

func (r GridProxyClient) Ping() error

Ping send a GET request to grid proxy ping endpoint and checks the response for pong

type Identity

type Identity substrate.Identity

Identity is the user identity to be used in substrate

func NewIdentityFromSr25519Phrase

func NewIdentityFromSr25519Phrase(phrase string) (Identity, error)

NewIdentityFromSr25519Phrase generates a new Sr25519 identity from mnemonics

type Monitor

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

Monitor for bot monitoring

func NewMonitor

func NewMonitor(ctx context.Context, env config, wallets wallets) (Monitor, error)

NewMonitor creates a new instance of monitor

func (*Monitor) Start

func (m *Monitor) Start(ctx context.Context) error

Start starting the monitoring service

Jump to

Keyboard shortcuts

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