pubsub

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    string            `json:"type"`
	Hash    string            `json:"hash"`
	Height  string            `json:"height"`
	Address string            `json:"address"`
	Params  map[string]string `json:"params"`
}

type EventPublisher

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

func CreateNewEventPublisher

func CreateNewEventPublisher() *EventPublisher

func (*EventPublisher) AppendNewConnection

func (e *EventPublisher) AppendNewConnection(conn *websocket.Conn)

func (*EventPublisher) Full

func (e *EventPublisher) Full() bool

func (*EventPublisher) Publish

func (e *EventPublisher) Publish(data []byte)

func (*EventPublisher) SelectPosition

func (e *EventPublisher) SelectPosition() int

type EventRequest

type EventRequest struct {
	Address   string `json:"address"`
	EventType string `json:"type"`
}

func DeserializeEventRequest

func DeserializeEventRequest(requestStr []byte) (*EventRequest, error)

type EventRouter

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

func CreateNewEventRouter

func CreateNewEventRouter() *EventRouter

func (*EventRouter) AppendEvent

func (e *EventRouter) AppendEvent(event Event)

func (*EventRouter) HandleConnect

func (e *EventRouter) HandleConnect(w http.ResponseWriter, r *http.Request)

func (*EventRouter) Process

func (e *EventRouter) Process()

type EventTopic

type EventTopic string

Jump to

Keyboard shortcuts

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