Documentation ¶
Index ¶
- Variables
- type Announcement
- type AnnouncementType
- type Announcements
- type FxAnnouncements
- func (an *FxAnnouncements) AnnounceIExistPeriodically(ctx context.Context)
- func (an *FxAnnouncements) AnnounceJoinPoolRequestPeriodically(ctx context.Context)
- func (an *FxAnnouncements) HandleAnnouncements(ctx context.Context)
- func (an *FxAnnouncements) SetPoolJoinRequestHandler(handler PoolJoinRequestHandler)
- func (an *FxAnnouncements) Shutdown(ctx context.Context) error
- func (an *FxAnnouncements) Start(ctx context.Context, validator pubsub.Validator) error
- func (an *FxAnnouncements) StopJoinPoolRequestAnnouncements()
- func (an *FxAnnouncements) ValidateAnnouncement(ctx context.Context, id peer.ID, msg *pubsub.Message, ...) bool
- type Option
- type PoolJoinRequestHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PubSubPrototypes struct { Announcement schema.TypedPrototype } )
Functions ¶
This section is empty.
Types ¶
type Announcement ¶
type Announcement struct { Version string Type AnnouncementType Addrs []string }
func (*Announcement) GetAddrs ¶
func (a *Announcement) GetAddrs() ([]multiaddr.Multiaddr, error)
func (*Announcement) MarshalBinary ¶
func (a *Announcement) MarshalBinary() ([]byte, error)
func (*Announcement) SetAddrs ¶
func (a *Announcement) SetAddrs(ma ...multiaddr.Multiaddr)
func (*Announcement) UnmarshalBinary ¶
func (a *Announcement) UnmarshalBinary(b []byte) error
type AnnouncementType ¶
type AnnouncementType int
const ( UnknownAnnouncementType AnnouncementType = iota IExistAnnouncementType PoolJoinRequestAnnouncementType PoolJoinApproveAnnouncementType NewManifestAnnouncementType )
type Announcements ¶
type Announcements interface { HandleAnnouncements(context.Context) AnnounceIExistPeriodically(context.Context) AnnounceJoinPoolRequestPeriodically(context.Context) ValidateAnnouncement(context.Context, peer.ID, *pubsub.Message, common.MemberStatus, bool) bool StopJoinPoolRequestAnnouncements() Shutdown(context.Context) error }
type FxAnnouncements ¶
type FxAnnouncements struct { PoolJoinRequestHandler PoolJoinRequestHandler // contains filtered or unexported fields }
func NewFxAnnouncements ¶
func NewFxAnnouncements(h host.Host, o ...Option) (*FxAnnouncements, error)
func (*FxAnnouncements) AnnounceIExistPeriodically ¶
func (an *FxAnnouncements) AnnounceIExistPeriodically(ctx context.Context)
func (*FxAnnouncements) AnnounceJoinPoolRequestPeriodically ¶
func (an *FxAnnouncements) AnnounceJoinPoolRequestPeriodically(ctx context.Context)
func (*FxAnnouncements) HandleAnnouncements ¶
func (an *FxAnnouncements) HandleAnnouncements(ctx context.Context)
func (*FxAnnouncements) SetPoolJoinRequestHandler ¶
func (an *FxAnnouncements) SetPoolJoinRequestHandler(handler PoolJoinRequestHandler)
In the announcements package, add this to your concrete type that implements the Announcements interface.
func (*FxAnnouncements) StopJoinPoolRequestAnnouncements ¶
func (an *FxAnnouncements) StopJoinPoolRequestAnnouncements()
func (*FxAnnouncements) ValidateAnnouncement ¶
type Option ¶
type Option func(*options) error
func WithAnnounceInterval ¶
func WithRelays ¶
func WithTimeout ¶
func WithTopicName ¶
Click to show internal directories.
Click to hide internal directories.