service

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReadTimeout = fmt.Errorf("timed out reading response")
View Source
var ReadMessageTimeout = time.Minute * 5
View Source
var TextileProtocol protocol.ID = "/textile/app/1.0.0"

Functions

This section is empty.

Types

type TextileService

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

func NewService

func NewService(
	node *core.IpfsNode,
	datastore repo.Datastore,
	getThread func(string) (*int, *thread.Thread),
	notify func(notificaiton *repo.Notification) error,
) *TextileService

func (*TextileService) DisconnectFromPeer

func (s *TextileService) DisconnectFromPeer(p peer.ID) error

func (*TextileService) HandleNewStream

func (s *TextileService) HandleNewStream(stream inet.Stream)

func (*TextileService) HandlerForMsgType

func (s *TextileService) HandlerForMsgType(t pb.Message_Type) func(peer.ID, *pb.Envelope, interface{}) (*pb.Envelope, error)

func (*TextileService) SendMessage

func (s *TextileService) SendMessage(ctx context.Context, p peer.ID, pmes *pb.Envelope) error

func (*TextileService) SendRequest

func (s *TextileService) SendRequest(ctx context.Context, p peer.ID, pmes *pb.Envelope) (*pb.Envelope, error)

Jump to

Keyboard shortcuts

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