mail

package
v0.0.0-...-d0dabfa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailService

type MailService struct {
	Inbox chan *pb.Envelope
	// contains filtered or unexported fields
}

func NewMailService

func NewMailService(
	ctx context.Context,
	account *keypair.Full,
	node func() *core.IpfsNode,
) *MailService

NewMailService returns a new mail service

func (*MailService) Handle

func (h *MailService) Handle(env *pb.Envelope, pid peer.ID) (*pb.Envelope, error)

Handle is called by the underlying service handler method

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

func (h *MailService) SendMessage(ctx context.Context, peerID string, env *pb.Envelope) error

SendMessage sends a message to a peer.

func (*MailService) Start

func (h *MailService) Start()

Start begins online services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳