components

package
v0.0.0-...-5a8d840 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discard

func Discard(num int) error

废弃当前用户的抽奖

func Drawn

func Drawn(nums []int) error

中奖者

func GetAllUserPool

func GetAllUserPool() map[int]*models.LuckdrawUser

func GetDrawnPool

func GetDrawnPool() map[int]*models.LuckdrawUser

获奖用户

func GetNormalPool

func GetNormalPool() map[int]*models.LuckdrawUser

获取有效用户

func ServeWs

func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request)

Types

type Client

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

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Consume

func (h *Hub) Consume()

func (*Hub) Produce

func (h *Hub) Produce(msg []byte) bool

生产消息

func (*Hub) Run

func (h *Hub) Run()

Jump to

Keyboard shortcuts

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