Documentation
¶
Index ¶
- Constants
- func NewService(queue *nats.EncodedConn, storage Storage) (processing.ProcessingServer, error)
- type Client
- type Command
- type CommandEvent
- type Processor
- type Storage
- func (s Storage) Close()
- func (s Storage) Command(id string) (Command, error)
- func (s Storage) CommandEvents(id string) ([]CommandEvent, error)
- func (s Storage) MessageReply(id string) (*processing.MessageReply, error)
- func (s Storage) SaveCommand(c Command) error
- func (s Storage) SaveCommandEvent(e CommandEvent) error
- func (s Storage) SaveMessageReply(r processing.MessageReply) error
Constants ¶
View Source
const ( ProcessorQueueGroup = "processor" ReplyReceivedSubject = "processor.reply.received" )
View Source
const ( DatabaseName = "processor" CommandCollectionName = "commands" CommandEventCollectionName = "commandevents" ReplyCollectionName = "replies" )
View Source
const (
RequestReceivedSubject = "request.received"
)
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(queue *nats.EncodedConn, storage Storage) (processing.ProcessingServer, error)
Types ¶
type Command ¶ added in v1.3.0
type Command struct {
Id string `json:"id"`
Request processing.MessageRequest `json:"request"`
Intent intent.Intent `json:"intent"`
}
type CommandEvent ¶ added in v1.3.0
type Processor ¶ added in v1.3.0
type Processor struct {
// contains filtered or unexported fields
}
func New ¶ added in v1.3.0
func New(logger zerolog.Logger, queue *nats.EncodedConn, registry intent.IntentRegistryClient, storage Storage) Processor
type Storage ¶ added in v1.3.0
type Storage struct {
Session *mgo.Session
CommandCollection *mgo.Collection
CommandEventCollection *mgo.Collection
ReplyCollection *mgo.Collection
}
func NewStorage ¶ added in v1.3.0
func (Storage) CommandEvents ¶ added in v1.3.0
func (s Storage) CommandEvents(id string) ([]CommandEvent, error)
func (Storage) MessageReply ¶ added in v1.4.0
func (s Storage) MessageReply(id string) (*processing.MessageReply, error)
func (Storage) SaveCommand ¶ added in v1.3.0
func (Storage) SaveCommandEvent ¶ added in v1.3.0
func (s Storage) SaveCommandEvent(e CommandEvent) error
func (Storage) SaveMessageReply ¶ added in v1.4.0
func (s Storage) SaveMessageReply(r processing.MessageReply) error
Click to show internal directories.
Click to hide internal directories.