Documentation ¶
Overview ¶
Package tissue is an efficient “social” protocol for maintaining mutual awareness and sharing resources amongs circuit workers.
Index ¶
Constants ¶
const ( // Expansion is the number of peers that each circuit worker is continuously connected to // for the purposes of dynamically maintaining node presence using the tissue // collaborative protocol. ExpansionLow = 7 ExpansionHigh = 11 Spread = 5 // Depth is the number of random walk steps taken when sampling for a random circuit worker. Depth = 3 * 2 // Lazy random walk with stay-put probability one half )
const ServiceName = "kin"
Variables ¶
This section is empty.
Functions ¶
func ForwardPanic ¶
ForwardPanic replaces the cross-interface x with one that captures panics during method calls and passes them to the fwd func in a separate goroutine, while also propagating the original panic through the stack.
Types ¶
type Avatar ¶
type Avatar struct { X circuit.PermX ID lang.ReceiverID }
Avatar is a pair of a permanent cross-interface and an ID, identifying its underlying receiver uniquely.
func ForwardAvatarPanic ¶
ForwardAvatarPanic is like ForwardPanic but for Avatar objects.
type Folk ¶
type Folk struct {
// contains filtered or unexported fields
}
func (*Folk) Opened ¶
func (folk *Folk) Opened() []FolkAvatar
func (*Folk) Replenish ¶
func (folk *Folk) Replenish() (peer FolkAvatar)
Replenish blocks and returns the next downstream peer added to the neighborhod set by the kin.
type FolkAvatar ¶
type FolkAvatar Avatar
FolkAvatar is an Avatar underlied by a user receiver for a service shared over the tissue system.
func (FolkAvatar) Avatar ¶
func (av FolkAvatar) Avatar() Avatar
func (FolkAvatar) String ¶
func (av FolkAvatar) String() string
type Neighborhood ¶
Neighborhood is a set of perm cross-interfaces.
func (*Neighborhood) Add ¶
func (nh *Neighborhood) Add(av Avatar)
func (*Neighborhood) Choose ¶
func (nh *Neighborhood) Choose() Avatar
Choose returns a randomly chosen Avatar.
func (*Neighborhood) Len ¶
func (nh *Neighborhood) Len() int
Len returns the number of Avatars in the rotor.
func (*Neighborhood) Scrub ¶
func (nh *Neighborhood) Scrub(key lang.ReceiverID) (Avatar, bool)
func (*Neighborhood) ScrubRandom ¶
func (nh *Neighborhood) ScrubRandom() (Avatar, bool)
func (*Neighborhood) View ¶
func (nh *Neighborhood) View() []Avatar
View returns a list of all Avatars in the rotor.
type XKin ¶
type XKin struct {
// contains filtered or unexported fields
}
XKin is the cross-worker interface of the tissue system at this circuit.
func (XKin) Attach ¶
func (x XKin) Attach(topic string) FolkAvatar
Attach returns a cross-reference to a folk service at this worker.