Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultParser = NewParser(map[string]func() Message{ "delete": func() Message { return &DeleteMessage{} }, "error": func() Message { return &ErrorMessage{} }, "job": func() Message { return &JobMessage{} }, "peek": func() Message { return &PeekMessage{} }, "ping": func() Message { return &PingMessage{} }, "reserve": func() Message { return &ReserveMessage{} }, "success": func() Message { return &SuccessMessage{} }, })
View Source
var (
MessageSize = 1024 * 16
)
Functions ¶
Types ¶
type DeleteMessage ¶
func (DeleteMessage) GetKey ¶
func (m DeleteMessage) GetKey() string
func (DeleteMessage) Serialise ¶
func (m DeleteMessage) Serialise() []byte
func (*DeleteMessage) SetKey ¶
func (m *DeleteMessage) SetKey(key string)
type ErrorMessage ¶
func (ErrorMessage) GetKey ¶
func (m ErrorMessage) GetKey() string
func (ErrorMessage) Serialise ¶
func (m ErrorMessage) Serialise() []byte
func (*ErrorMessage) SetKey ¶
func (m *ErrorMessage) SetKey(key string)
type JobMessage ¶
type JobMessage struct { Key string ID string Queue string Priority float64 HoldUntil int64 TTR uint64 Content string }
func (JobMessage) GetKey ¶
func (m JobMessage) GetKey() string
func (JobMessage) Serialise ¶
func (m JobMessage) Serialise() []byte
func (*JobMessage) SetKey ¶
func (m *JobMessage) SetKey(key string)
type Message ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
type PeekMessage ¶
func (PeekMessage) GetKey ¶
func (m PeekMessage) GetKey() string
func (PeekMessage) Serialise ¶
func (m PeekMessage) Serialise() []byte
func (*PeekMessage) SetKey ¶
func (m *PeekMessage) SetKey(key string)
type PingMessage ¶
type PingMessage struct {
Key string
}
func (PingMessage) GetKey ¶
func (m PingMessage) GetKey() string
func (PingMessage) Serialise ¶
func (m PingMessage) Serialise() []byte
func (*PingMessage) SetKey ¶
func (m *PingMessage) SetKey(key string)
type ReserveMessage ¶
func (ReserveMessage) GetKey ¶
func (m ReserveMessage) GetKey() string
func (ReserveMessage) Serialise ¶
func (m ReserveMessage) Serialise() []byte
func (*ReserveMessage) SetKey ¶
func (m *ReserveMessage) SetKey(key string)
type SuccessMessage ¶
type SuccessMessage struct {
Key string
}
func (SuccessMessage) GetKey ¶
func (m SuccessMessage) GetKey() string
func (SuccessMessage) Serialise ¶
func (m SuccessMessage) Serialise() []byte
func (*SuccessMessage) SetKey ¶
func (m *SuccessMessage) SetKey(key string)
Click to show internal directories.
Click to hide internal directories.