connection

package
v0.176.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidTimestamp = int64(-1)

Variables

This section is empty.

Functions

This section is empty.

Types

type State added in v0.167.5

type State struct {
	Value         StateValue `json:"value"`
	LastCheckedAt int64      `json:"last_checked_at"`
	LastSuccessAt int64      `json:"last_success_at"`
}

func NewState added in v0.167.5

func NewState() State

type StateChangeCb added in v0.167.5

type StateChangeCb func(State)

type StateValue added in v0.167.5

type StateValue int
const (
	StateValueUnknown StateValue = iota
	StateValueConnected
	StateValueDisconnected
)

type Status

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

func NewStatus

func NewStatus() *Status

func (*Status) GetState added in v0.167.5

func (c *Status) GetState() State

func (*Status) GetStateValue added in v0.167.5

func (c *Status) GetStateValue() StateValue

func (*Status) IsConnected

func (c *Status) IsConnected() bool

func (*Status) ResetStateValue added in v0.167.5

func (c *Status) ResetStateValue()

func (*Status) SetIsConnected

func (c *Status) SetIsConnected(value bool)

func (*Status) SetState added in v0.167.5

func (c *Status) SetState(state State)

func (*Status) SetStateChangeCb added in v0.167.5

func (c *Status) SetStateChangeCb(stateChangeCb StateChangeCb)

type StatusNotification added in v0.167.5

type StatusNotification map[string]State // id -> State

Client expects a single event with all states

type StatusNotifier added in v0.167.5

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

func NewStatusNotifier added in v0.167.5

func NewStatusNotifier(statuses map[string]*Status, eventType walletevent.EventType, feed *event.Feed) *StatusNotifier

Jump to

Keyboard shortcuts

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