blockchain

package
v0.0.0-...-5f11a35 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	ID          string   `json:"chain-id"`
	RPC         []string `json:"rpc"`
	LCD         []string `json:"lcd"`
	LatestBlock string
}

type Chains

type Chains []Chain

type Dispatcher

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

Dispatcher gets new jobs and passes them onto works. It also initializes new workers when needed

type Job

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

Job encapsulates job description and instructions to perform

type Manager

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

Manager makes sure that all blockchain requests are executed accordingly. It controls the jobs, requests and data

func NewManager

func NewManager(chains *Chains) (*Manager, error)

func (*Manager) GetChains

func (m *Manager) GetChains() Chains

GetChains loops through all workers and gets their chain details. The reason why we don't use the file is because chains could've been added at runtime

func (*Manager) SetUpdateChan

func (m *Manager) SetUpdateChan(c chan models.ChainUpdate)

func (*Manager) Start

func (m *Manager) Start()

type Worker

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

Worker gets the job and performs job tasks

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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