Documentation
¶
Index ¶
Constants ¶
View Source
const ( // INIT status INIT = "INIT" // PROCESSING status PROCESSING = "PROCESSING" // SUCCEED status SUCCEED = "SUCCEED" // FAILED status FAILED = "FAILED" )
Variables ¶
View Source
var DEFAULTTYPETACTIC = TypeTactic{ Tactic: Tactic{ Interval: 3, AsyncCount: 1, }, }
DEFAULTTYPETACTIC defined default Tactic
Functions ¶
This section is empty.
Types ¶
type MQ ¶
type MQ struct {
Model Model
Exector []Exector
TypeTactic []TypeTactic
Interval []chan bool
}
MQ defined message queue struct
func (*MQ) AddTactics ¶
AddTactics add Tactics to system
type Memo ¶
type Memo struct {
Model
// contains filtered or unexported fields
}
Memo defined memory model
type Message ¶
type Message struct {
ID int
Type string
Body map[string]interface{}
Status string
CreatedAt time.Time
}
Message defined message entity struct
type Model ¶
type Model interface {
Save(Message)
Find(string, string) *Message
Count(string, string) uint
Update(*Message, string) error
}
Model defined model store
type Tactic ¶
type Tactic struct {
// Interval every interval do work
Interval int
// AsyncCount defined all count in aount
AsyncCount uint
}
Tactic defined interval type
type TypeTactic ¶
TypeTactic defined interval type
Click to show internal directories.
Click to hide internal directories.