dispatcher

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageService

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

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

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

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

type ProtocolService

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