route

package
v0.1.3-0...-617a0de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRouteSvc

type MockRouteSvc struct {
	ProtocolName       string
	HandleFunc         func(service.DIDCommMsg) (string, error)
	HandleOutboundFunc func(msg service.DIDCommMsg, myDID, theirDID string) error
	AcceptFunc         func(string) bool
	RegisterFunc       func(connectionID string) error
	RouterEndpoint     string
	RoutingKeys        []string
	ConfigErr          error
	AddKeyErr          error
	UnregisterErr      error
	ConnectionID       string
	GetConnectionIDErr error
}

MockRouteSvc mock route service

func (*MockRouteSvc) Accept

func (m *MockRouteSvc) Accept(msgType string) bool

Accept msg checks the msg type

func (*MockRouteSvc) AddKey

func (m *MockRouteSvc) AddKey(recKey string) error

AddKey adds agents recKey to the router

func (*MockRouteSvc) Config

func (m *MockRouteSvc) Config() (*route.Config, error)

Config gives back the router configuration

func (*MockRouteSvc) GetConnection

func (m *MockRouteSvc) GetConnection() (string, error)

GetConnection returns the connectionID of the router.

func (*MockRouteSvc) HandleInbound

func (m *MockRouteSvc) HandleInbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)

HandleInbound msg

func (*MockRouteSvc) HandleOutbound

func (m *MockRouteSvc) HandleOutbound(msg service.DIDCommMsg, myDID, theirDID string) error

HandleOutbound msg

func (*MockRouteSvc) Name

func (m *MockRouteSvc) Name() string

Name return service name

func (*MockRouteSvc) Register

func (m *MockRouteSvc) Register(connectionID string) error

Register registers agent with the router.

func (*MockRouteSvc) Unregister

func (m *MockRouteSvc) Unregister() error

Unregister unregisters the router

Jump to

Keyboard shortcuts

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