flood

package
v0.0.0-...-3aaa451 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupWaitRecv = NewWaitRecvGroup()

Functions

func FindRequest

func FindRequest(tag string) bool

查询一个消息,看是否存在

func RegisterRequest

func RegisterRequest(tag string)

注册一个消息,立即返回,另外一个方法去取消息

func RemoveRequest

func RemoveRequest(tag string)

删除一个消息

func ResponseBytes

func ResponseBytes(tag string, bs *[]byte) bool

有消息内容返回了 @return bool 是否有对应的等待

func ResponseItr

func ResponseItr(tag string, itr interface{}) bool

有消息内容返回了

func WaitResponse

func WaitResponse(tag string, timeout time.Duration) (*[]byte, error)

等待返回消息内容

func WaitResponseItr

func WaitResponseItr(tag string, timeout time.Duration) (interface{}, error)

等待返回消息内容

Types

type HttpRequestWait

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

type WaitRecvGroup

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

func NewWaitRecvGroup

func NewWaitRecvGroup() *WaitRecvGroup

func (*WaitRecvGroup) FindRequest

func (this *WaitRecvGroup) FindRequest(groupID, tag string) bool

查询一个消息,看是否存在

func (*WaitRecvGroup) GetGroup

func (this *WaitRecvGroup) GetGroup(groupID string) *WaitRecvOne

查询一个组

func (*WaitRecvGroup) RegisterRequest

func (this *WaitRecvGroup) RegisterRequest(groupID, tag string)

注册一个消息,立即返回,另外一个方法去取消息

func (*WaitRecvGroup) RemoveGroup

func (this *WaitRecvGroup) RemoveGroup(groupID, tag string)

删除一个组的消息

func (*WaitRecvGroup) RemoveRequest

func (this *WaitRecvGroup) RemoveRequest(groupID, tag string)

删除一个消息

func (*WaitRecvGroup) ResponseBytes

func (this *WaitRecvGroup) ResponseBytes(groupID, tag string, bs *[]byte) bool

有消息内容返回了 @return bool 是否有对应的等待

func (*WaitRecvGroup) ResponseItr

func (this *WaitRecvGroup) ResponseItr(groupID, tag string, itr interface{}) bool

有消息内容返回了

func (*WaitRecvGroup) ResponseItrGroup

func (this *WaitRecvGroup) ResponseItrGroup(groupID string, itr interface{})

有一组消息内容返回了

func (*WaitRecvGroup) WaitResponse

func (this *WaitRecvGroup) WaitResponse(groupID, tag string, timeout time.Duration) (*[]byte, error)

等待返回消息内容

func (*WaitRecvGroup) WaitResponseItr

func (this *WaitRecvGroup) WaitResponseItr(groupID, tag string, timeout time.Duration) (interface{}, error)

等待返回消息内容

type WaitRecvOne

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

func NewWaitRecvOne

func NewWaitRecvOne() *WaitRecvOne

func (*WaitRecvOne) FindRequest

func (this *WaitRecvOne) FindRequest(tag string) bool

查询一个消息,看是否存在

func (*WaitRecvOne) GetAllChan

func (this *WaitRecvOne) GetAllChan() *[]chan interface{}

获取所有等待的消息管道

func (*WaitRecvOne) Length

func (this *WaitRecvOne) Length() int

删除一个消息

func (*WaitRecvOne) RegisterRequest

func (this *WaitRecvOne) RegisterRequest(tag string)

注册一个消息,立即返回,另外一个方法去取消息

func (*WaitRecvOne) RemoveRequest

func (this *WaitRecvOne) RemoveRequest(tag string)

删除一个消息

func (*WaitRecvOne) ResponseBytes

func (this *WaitRecvOne) ResponseBytes(tag string, bs *[]byte) bool

有消息内容返回了 @return bool 是否有对应的等待

func (*WaitRecvOne) ResponseItr

func (this *WaitRecvOne) ResponseItr(tag string, itr interface{}) bool

有消息内容返回了

func (*WaitRecvOne) WaitResponse

func (this *WaitRecvOne) WaitResponse(tag string, timeout time.Duration) (*[]byte, error)

等待返回消息内容

func (*WaitRecvOne) WaitResponseItr

func (this *WaitRecvOne) WaitResponseItr(tag string, timeout time.Duration) (interface{}, error)

等待返回消息内容

Jump to

Keyboard shortcuts

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