dispatcher

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 12 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageService added in v0.1.1

type MessageService interface {
	service.InboundHandler
	Accept(msgType string, purpose []string) bool
	Name() string
}

MessageService is service for handling generic messages matching accept criteria based on message header.

type Outbound

type Outbound interface {
	// Send the message after packing with the sender key and recipient keys.
	Send(interface{}, string, *service.Destination) error

	// SendToDID Sends the message after packing with the keys derived from DIDs.
	SendToDID(msg interface{}, myDID, theirDID string) error

	// Forward forwards the message without packing to the destination.
	Forward(interface{}, *service.Destination) error
}

Outbound interface.

type OutboundDispatcher

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

OutboundDispatcher dispatch msgs to destination.

func NewOutbound

func NewOutbound(prov provider) *OutboundDispatcher

NewOutbound return new dispatcher outbound instance.

func (*OutboundDispatcher) Forward added in v0.1.1

func (o *OutboundDispatcher) Forward(msg interface{}, des *service.Destination) error

Forward forwards the message without packing to the destination.

func (*OutboundDispatcher) Send

func (o *OutboundDispatcher) Send(msg interface{}, senderVerKey string, des *service.Destination) error

Send sends the message after packing with the sender key and recipient keys.

func (*OutboundDispatcher) SendToDID added in v0.1.1

func (o *OutboundDispatcher) SendToDID(msg interface{}, myDID, theirDID string) error

SendToDID sends a message from myDID to the agent who owns theirDID.

type ProtocolService added in v0.1.1

type ProtocolService interface {
	service.Handler
	Accept(msgType string) bool
	Name() string
}

ProtocolService is service interface for protocol services available in framework for matching acceptance criteria based on message type.

Jump to

Keyboard shortcuts

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