web

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GasLineMessage

func GasLineMessage(s *live.Socket, webGasTicker *time.Ticker, ethNodes *nodes.Nodes)

Types

type EventMessage

type EventMessage struct {
	ID              string // Unique ID per message so that we can use `live-update`.
	User            string
	Msg             string
	Time            string
	Typemoji        string
	TxLogCount      uint64
	TxLogCountColor lipgloss.Color
	Price           string
	PricePerItem    float64
	PriceArrowColor string
	CollectionName  string
	TokenID         *big.Int
	ColorPrimary    string
	ColorSecondary  string
	To              string
	ToColor         string
	Event           *collections.Event
	SalesCount      uint64
	ListingsCount   uint64
	SaLiRa          float64
	LinkOpenSea     string
	LinkEtherscan   string
	GasLine         string
}

func NewEvent

func NewEvent(data interface{}) EventMessage

type EventStream

type EventStream struct {
	ID            string
	ListenAddress string

	Events []EventMessage

	Nodes *nodes.Nodes
	// contains filtered or unexported fields
}

func New

func New(queueWeb *chan *collections.Event, listenAddress string, nodes *nodes.Nodes) *EventStream

func (*EventStream) NewEventHandler

func (es *EventStream) NewEventHandler() live.Handler

func (*EventStream) NewEventstreamInstance

func (es *EventStream) NewEventstreamInstance(s live.Socket) *EventStream

func (*EventStream) Start

func (es *EventStream) Start()

Jump to

Keyboard shortcuts

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