routing

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidInput required input was not found
	ErrInvalidInput = errors.New("required input was not found")

	// ErrChannelNotFound rabbit channel was not found
	ErrChannelNotFound = errors.New("rabbit channel was not found")
)

Functions

This section is empty.

Types

type MessageHandler

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

MessageHandler takes the Symbl objects and performs an action with them

func NewHandler

func NewHandler(options MessageHandlerOptions) (*MessageHandler, error)

func (*MessageHandler) EntityResponseMessage

func (mh *MessageHandler) EntityResponseMessage(er *sdkinterfaces.EntityResponse) error

func (*MessageHandler) HandleActionItem

func (mh *MessageHandler) HandleActionItem(insight *sdkinterfaces.Insight, number int) error

func (*MessageHandler) HandleFollowUp

func (mh *MessageHandler) HandleFollowUp(insight *sdkinterfaces.Insight, number int) error

func (*MessageHandler) HandleQuestion

func (mh *MessageHandler) HandleQuestion(insight *sdkinterfaces.Insight, number int) error

func (*MessageHandler) Init

func (mh *MessageHandler) Init() error

func (*MessageHandler) InitializedConversation

func (mh *MessageHandler) InitializedConversation(im *sdkinterfaces.InitializationMessage) error

func (*MessageHandler) InsightResponseMessage

func (mh *MessageHandler) InsightResponseMessage(ir *sdkinterfaces.InsightResponse) error

func (*MessageHandler) MessageResponseMessage

func (mh *MessageHandler) MessageResponseMessage(mr *sdkinterfaces.MessageResponse) error

func (*MessageHandler) RecognitionResultMessage

func (mh *MessageHandler) RecognitionResultMessage(rr *sdkinterfaces.RecognitionResult) error

func (*MessageHandler) Teardown

func (mh *MessageHandler) Teardown() error

func (*MessageHandler) TeardownConversation

func (mh *MessageHandler) TeardownConversation(tm *sdkinterfaces.TeardownMessage) error

func (*MessageHandler) TopicResponseMessage

func (mh *MessageHandler) TopicResponseMessage(tr *sdkinterfaces.TopicResponse) error

func (*MessageHandler) TrackerResponseMessage

func (mh *MessageHandler) TrackerResponseMessage(tr *sdkinterfaces.TrackerResponse) error

func (*MessageHandler) UnhandledMessage

func (mh *MessageHandler) UnhandledMessage(byMsg []byte) error

Not used

func (*MessageHandler) UserDefinedMessage

func (mh *MessageHandler) UserDefinedMessage(byMsg []byte) error

Not used

type MessageHandlerOptions

type MessageHandlerOptions struct {
	//housekeeping
	ConversationId string

	// features
	TranscriptionEnabled bool
	MessagingEnabled     bool

	// callback
	Callback *MessagePassthrough

	// neo4j
	Neo4jMgr *neo4j.SessionWithContext

	// neo4j session
	RabbitMgr *rabbitinterfaces.Manager
}

MessageHandlerOptions to init the handler

type MessagePassthrough

type MessagePassthrough interface {
	SendRecognition(r *interfaces.UserDefinedRecognition) error
	SendMessages(m *interfaces.UserDefinedMessages) error
}

MessagePassthrough used mainly for chat and closed captioning

type MessageRouter

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

MessageRouter converts messages to Symbl objects

func NewRouter

func NewRouter(options MessageRouterOptions) *MessageRouter

func (*MessageRouter) HandleMessage

func (mr *MessageRouter) HandleMessage(byMsg []byte) error

type MessageRouterOptions

type MessageRouterOptions struct {
	Callback *sdkinterfaces.InsightCallback
}
MessageRouter objects...

MessageRouterOptions to init the router

Jump to

Keyboard shortcuts

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