Documentation
¶
Index ¶
- type MailService
- func (h *MailService) Handle(env *pb.Envelope, pid peer.ID) (*pb.Envelope, error)
- func (h *MailService) HandleStream(_ *pb.Envelope, _ peer.ID) (chan *pb.Envelope, chan error, chan interface{})
- func (h *MailService) Ping(pid peer.ID) (service.PeerStatus, error)
- func (h *MailService) Protocol() protocol.ID
- func (h *MailService) SendMessage(ctx context.Context, peerID string, env *pb.Envelope) error
- func (h *MailService) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailService ¶
func NewMailService ¶
func NewMailService( ctx context.Context, account *keypair.Full, node func() *core.IpfsNode, ) *MailService
NewMailService returns a new mail service
func (*MailService) HandleStream ¶
func (h *MailService) HandleStream(_ *pb.Envelope, _ peer.ID) (chan *pb.Envelope, chan error, chan interface{})
HandleStream is called by the underlying service handler method
func (*MailService) Ping ¶
func (h *MailService) Ping(pid peer.ID) (service.PeerStatus, error)
Ping pings another peer
func (*MailService) Protocol ¶
func (h *MailService) Protocol() protocol.ID
Protocol returns the handler protocol
func (*MailService) SendMessage ¶
SendMessage sends a message to a peer.
Click to show internal directories.
Click to hide internal directories.