messenger

package
v0.0.0-...-105113c Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Topic = "DropCommunication"
)

Variables

Functions

This section is empty.

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func NewListener

func NewListener(lc fx.Lifecycle, ps *PubSub) (*Listener, error)

func (*Listener) Get

func (l *Listener) Get(hash string) error

func (*Listener) GetDownloads

func (l *Listener) GetDownloads() []Progress

func (*Listener) SetDownloadFinishHook

func (l *Listener) SetDownloadFinishHook(di func(string))

func (*Listener) SetDownloadLocation

func (l *Listener) SetDownloadLocation(dl string)

func (*Listener) SetDownloadStartHook

func (l *Listener) SetDownloadStartHook(di func(string))

func (*Listener) SetID

func (l *Listener) SetID(id string)

func (*Listener) SetPeer

func (l *Listener) SetPeer(p ListenerNode) error

type ListenerNode

type ListenerNode interface {
	Getter() ipld.DAGService
	Adder(context.Context) func(io.Reader) (ipld.Node, error)
}

type Message

type Message struct {
	Hash []string
}

func (*Message) Marshal

func (m *Message) Marshal() ([]byte, error)

func (*Message) Unmarshal

func (m *Message) Unmarshal(val []byte) error

type Progress

type Progress struct {
	Location string
	Filename string
	Size     int64
	Progress string
}

type PubSub

type PubSub struct {
	*pubsub.Topic
}

func NewPubSub

func NewPubSub(ps *pubsub.PubSub) (*PubSub, error)

type Sender

type Sender interface {
	Send(hash ...string) error
}

func NewSender

func NewSender(ps *PubSub) Sender

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL