api

package
v0.0.0-...-f0e9cdc Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainMessageServiceServer

type DomainMessageServiceServer struct {
	MessageRepository   domain.MessageRepository
	Entropy             io.Reader
	MessageEventChannel MessageEventChannel
}

DomainMessageServiceServer is an implement of rpc MessageServiceServer using domain logic

func (*DomainMessageServiceServer) QueryMessagesInRange

QueryMessagesInRange implements the rpc method QueryMessagesInRange

func (*DomainMessageServiceServer) SendMessage

SendMessage implements the rpc method SendMessage

type DomainPushServiceServer

type DomainPushServiceServer struct {
	MessageEventChannel MessageEventChannel
}

DomainPushServiceServer is an implement of rpc PushServiceServer using domain logic

func (*DomainPushServiceServer) Messages

Messages implements rpc method Messages

type MessageEventChannel

type MessageEventChannel interface {
	EmitNewMessageEvent(message *domain.Message) error
	Subscribe(chatroomID string, handler func(m *domain.Message)) (drain func(), err error)
	Drain() error
}

MessageEventChannel defines the interface of the message event channel

Jump to

Keyboard shortcuts

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