updater

package
v4.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package updater manages the connection with the bitboxbase, establishing a websocket listener and sending events when receiving packets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	observable.Implementation
	// contains filtered or unexported fields
}

Updater implements observable blockchainInfo.

func NewUpdater

func NewUpdater(address string) *Updater

NewUpdater returns a new bitboxbase updater.

func (*Updater) BlockInfo

func (updater *Updater) BlockInfo() string

BlockInfo returns the last received blockchain information packet from the middleware

func (*Updater) Connect

func (updater *Updater) Connect(address string, bitboxBaseID string) error

Connect start the websocket go routine, first checking if the middleware is reachable

func (*Updater) GetEnv

func (updater *Updater) GetEnv() ([]byte, error)

GetEnv makes an http GET request to the base and on success returns some environment data from the base such as the electrs port

func (*Updater) Stop

func (updater *Updater) Stop()

Stop provides a setter for the running flag

Jump to

Keyboard shortcuts

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