Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messenger

type Messenger struct {
	mock.Mock
	// contains filtered or unexported fields
}

Messenger is a messenger that returns error on every operation.

func NewMessenger

func NewMessenger() *Messenger

NewMessenger returns a mocked messenger used for testing.

func (*Messenger) Install

func (m *Messenger) Install(handler messenger.MessageHandler, msg proto.Message) error

Install is a mocked implementation.

func (*Messenger) Recv

func (m *Messenger) Recv(from *upid.UPID, msg proto.Message)

Recv receives a upid and a message, it will dispatch the message to its handler with the upid. This is for testing.

func (*Messenger) Route

func (m *Messenger) Route(ctx context.Context, upid *upid.UPID, msg proto.Message) error

func (*Messenger) Send

func (m *Messenger) Send(ctx context.Context, upid *upid.UPID, msg proto.Message) error

Send is a mocked implementation.

func (*Messenger) Start

func (m *Messenger) Start() error

Start is a mocked implementation.

func (*Messenger) Stop

func (m *Messenger) Stop() error

Stop is a mocked implementation.

func (*Messenger) UPID

func (m *Messenger) UPID() upid.UPID

UPID is a mocked implementation.

Source Files