wsevent

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(o Option)

Types

type Option

type Option struct {
}

type SubscribeHandler

type SubscribeHandler func(res interface{})

type WSEvent

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

func Instance

func Instance() *WSEvent

func (*WSEvent) Pub

func (w *WSEvent) Pub(event string, data interface{})

func (*WSEvent) RemoveEvent

func (w *WSEvent) RemoveEvent(event string)

func (*WSEvent) Sub

func (w *WSEvent) Sub(event string, handler SubscribeHandler)

Jump to

Keyboard shortcuts

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