Exemple #1
0
func (exchange *Exchange) Persist(db *bolt.DB) error {
	var key = exchange.Name
	if key == "" {
		key = "~"
	}
	return persist.PersistOne(db, EXCHANGES_BUCKET_NAME, key, &exchange.ExchangeState)
}
Exemple #2
0
func (b *Binding) Persist(db *bolt.DB) error {
	return persist.PersistOne(db, BINDINGS_BUCKET_NAME, string(b.Id), b)
}
Exemple #3
0
func (q *Queue) Persist(db *bolt.DB) error {
	return persist.PersistOne(db, QUEUE_BUCKET_NAME, q.Name, q)
}