service

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 33 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyPayload occurs when an inbound message is provided without the contents
	ErrEmptyPayload = errors.New("message payload is empty")
)
View Source
var ErrReadTimeout = fmt.Errorf("timed out reading response")
View Source
var ErrWriteTimeout = fmt.Errorf("timed out writing message")
View Source
var ReadMessageTimeout = time.Minute * 5

Functions

This section is empty.

Types

type OpenBazaarService

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

func New added in v0.2.4

func New(node *core.OpenBazaarNode, datastore repo.Datastore) *OpenBazaarService

func (*OpenBazaarService) DisconnectFromPeer added in v0.9.3

func (service *OpenBazaarService) DisconnectFromPeer(p peer.ID)

func (*OpenBazaarService) HandleNewStream

func (service *OpenBazaarService) HandleNewStream(s inet.Stream)

func (*OpenBazaarService) HandlerForMsgType

func (service *OpenBazaarService) HandlerForMsgType(t pb.Message_MessageType) func(peer.ID, *pb.Message, interface{}) (*pb.Message, error)

func (*OpenBazaarService) SendMessage

func (service *OpenBazaarService) SendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error

func (*OpenBazaarService) SendProcessingError added in v0.13.5

func (service *OpenBazaarService) SendProcessingError(peerID, orderID string, attemptedMessage pb.Message_MessageType, latestContract *pb.RicardianContract) error

SendProcessingError produces a ORDER_PROCESSING_FAILURE error message to be sent to peerID regarding orderID. This message should cause the peerID to reproduce the missing messages omitted in latestContract up-to-and-including the last attemptedMessage

func (*OpenBazaarService) SendRequest

func (service *OpenBazaarService) SendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error)

func (*OpenBazaarService) WaitForReady added in v0.13.1

func (service *OpenBazaarService) WaitForReady()

Jump to

Keyboard shortcuts

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