Documentation ¶
Index ¶
- type Record
- type Rev
- type Tube
- func (t *Tube) BulkRead() []*Record
- func (t *Tube) BulkWrite(bulk []*Record)
- func (t *Tube) Forget(key string, notAfterRev Rev, notAfterUpdated time.Time) bool
- func (t *Tube) Lookup(key string) *Record
- func (t *Tube) NewArrivals() *pubsub.Subscription
- func (t *Tube) NewDepartures() *pubsub.Subscription
- func (t *Tube) Scrub(key string, notAfterRev Rev, notAfterUpdated time.Time)
- func (t *Tube) Write(key string, rev Rev, value interface{}) (changed bool)
- type View
- func (v *View) Dump() string
- func (v *View) Forget(key string, notAfterRev Rev, notUpdatedAfter time.Time) bool
- func (v *View) Lookup(key string) *Record
- func (v *View) NewArrivals() *pubsub.Subscription
- func (v *View) NewDepartures() *pubsub.Subscription
- func (v *View) Peek() []*Record
- func (v *View) Update(r *Record) (changed bool)
- type XTube
- type YTube
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tube ¶
Tube is a folk data structure that maintains a key-value set sorted by key. …
func (*Tube) BulkWrite ¶
BulkWrite writes the given set of records to our local view. Resulting changes are pushed to downstream peers as necessary and in bulk.
func (*Tube) NewArrivals ¶
func (t *Tube) NewArrivals() *pubsub.Subscription
NewArrivals returns a subscription for the stream of arriving peer identities.
func (*Tube) NewDepartures ¶
func (t *Tube) NewDepartures() *pubsub.Subscription
NewDepartures returns a subscription for the stream of departing peer identities.
type View ¶
View is a folk data structure that maintains a key-value set sorted by key
func (*View) Forget ¶
Forget removes the record for key from the view, only if the current record has revision no greater than notAfterRev and has not been updated after notUpdatedAfter.
The notAfterRev condition is not in effect is notAfterRev is zero. Similarly, the notUpdatedAfter condition is not in effect if notUpdatedAfter is zero.
The returned value reflects whether a removal takes place.
func (*View) NewArrivals ¶
func (v *View) NewArrivals() *pubsub.Subscription
NewArrivals returns a subscription for the stream of arriving peer identities.
func (*View) NewDepartures ¶
func (v *View) NewDepartures() *pubsub.Subscription
NewDepartures returns a subscription for the stream of departing peer identities.
type XTube ¶
type XTube struct {
// contains filtered or unexported fields
}
XTube is the interface to a tube, given to the tube's upstream (cross-circiuit) peering tubes.
func (XTube) Avatar ¶
func (x XTube) Avatar() tissue.FolkAvatar
Avatar returns an Avatar pointing to this tube