Documentation ¶
Index ¶
- Constants
- Variables
- type Item
- type Queue
- func (this *Queue) Close() error
- func (this *Queue) Exists(msg string) bool
- func (this *Queue) Find(offset, limit int) []*Item
- func (this *Queue) Get() (string, error)
- func (this *Queue) Put(msg string) error
- func (this *Queue) Reply(msg string, status int, errMsg string) error
- func (this *Queue) ReplyInvalid(msg, errMsg string) error
- func (this *Queue) ReplyOK(msg string) error
- func (this *Queue) SetSeparator(separator string)
- func (this *Queue) Size() int
- func (this *Queue) Stats() *Stats
- type Stats
Constants ¶
View Source
const ( StatusPending = iota // 0 StatusProcessing // 1 StatusInvalid // 2 StatusOK // 3 )
Variables ¶
View Source
var ( StoreBucket = []byte("stores") IdsBucket = []byte("ids") StatBucket = []byte("stats") )
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { ID int `json:"id"` Message string `json:"message"` Status int `json:"status"` Error string `json:"error"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func NewItemFromBytes ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) ReplyInvalid ¶
func (*Queue) SetSeparator ¶
仅用于判断消息是否存在 如果设置分隔符,会用分隔符切割,取分隔后的最后一段作为消息,判断消息是否存在
Click to show internal directories.
Click to hide internal directories.