monitor

package
v0.0.0-...-2244ce7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config is configurations parsed from the env file

func ParseConfig

func ParseConfig(envPath string) (Config, error)

type Monitor

type Monitor struct {
	Bot      *tgapi.BotAPI
	BotToken string
	// contains filtered or unexported fields
}

Monitor struct of parsed configration

func NewMonitor

func NewMonitor(conf Config) (Monitor, error)

NewMonitor creates a new monitor from parsed config/env file

func (Monitor) StartMonitoring

func (mon Monitor) StartMonitoring(addChatChan chan User, stopChatChan chan int64)

StartMonitoring starts monitoring the contracts with specific mnemonics and notify subscribed chats every fixed interval

type User

type User struct {
	ChatID int64
	// contains filtered or unexported fields
}

User struct of user info and mnemonic

func NewUser

func NewUser(msg tgapi.Update) (User, error)

NewUser parses the user message to mnemonic and network and validate them

Jump to

Keyboard shortcuts

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