list

package
v0.0.0-...-021ab65 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TickerMsg = time.Millisecond * 200

Functions

This section is empty.

Types

type Data

type Data struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type Message

type Message struct {
	Data
	Stamp int64 `json:"-"`
}

Message 消息结构体

type MyList

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

MyList 消息队列

func NewMyList

func NewMyList() *MyList

func (*MyList) GetBack

func (l *MyList) GetBack() interface{}

GetBack 从头取

func (*MyList) GetFront

func (l *MyList) GetFront() interface{}

GetFront 从尾取

func (*MyList) Len

func (l *MyList) Len() int

func (*MyList) PushBack

func (l *MyList) PushBack(code int, msg string)

PushBack 头插

func (*MyList) PushFront

func (l *MyList) PushFront(code int, msg string)

PushFront 尾插

func (*MyList) PushFrontData

func (l *MyList) PushFrontData(data Message)

PushFrontData 尾插

func (*MyList) Remove

func (l *MyList) Remove(e *list.Element)

Jump to

Keyboard shortcuts

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