apicommon

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HORIZON_SERVERS = [...]string{"firmware.bluehorizon.network", "images.bluehorizon.network"}

Functions

func GetBCNameMap

func GetBCNameMap(typeName string, bcState map[string]map[string]BlockchainState) map[string]BlockchainState

func HandleNewBCInit

func HandleNewBCInit(ev *events.BlockchainClientInitializedMessage, bcState map[string]map[string]BlockchainState, bcStateLock *sync.Mutex)

func HandleStoppingBC

func HandleStoppingBC(ev *events.BlockchainClientStoppingMessage, bcState map[string]map[string]BlockchainState, bcStateLock *sync.Mutex)

func WriteConnectionStatus

func WriteConnectionStatus(info *Info) error

Writes the server connectivity info int the Info strucure. It is used for /info api

Types

type BlockchainState

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

func (*BlockchainState) GetService

func (b *BlockchainState) GetService() string

func (*BlockchainState) GetServicePort

func (b *BlockchainState) GetServicePort() string

type Configuration

type Configuration struct {
	ExchangeAPI     string `json:"exchange_api"`
	ExchangeVersion string `json:"exchange_version"`
	MinExchVersion  string `json:"required_minimum_exchange_version"`
	PrefExchVersion string `json:"preferred_exchange_version"`
	MMSAPI          string `json:"mms_api"`
	Arch            string `json:"architecture"`
	HorizonVersion  string `json:"horizon_version"`
}

type Info

type Info struct {
	Configuration *Configuration  `json:"configuration"`
	Connectivity  map[string]bool `json:"connectivity"`
}

func NewInfo

func NewInfo(httpClientFactory *config.HTTPClientFactory, exchangeUrl string, mmsUrl string, id string, token string) *Info

Jump to

Keyboard shortcuts

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