Documentation ¶
Index ¶
- type FilterMiddleware
- type MessageLockerByType
- func (ml *MessageLockerByType) Filter(m *message.Message) (*message.Message, error)
- func (ml *MessageLockerByType) GetMessagesFilters(ctx context.Context, in *introproto.EmptyArgs) (*introproto.AllMessageFilterStats, error)
- func (ml *MessageLockerByType) SetMessagesFilter(ctx context.Context, in *introproto.MessageFilterByType) (*introproto.MessageFilterByType, error)
- type MessageStatByType
- type PublisherService
- type PublisherWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterMiddleware ¶
FilterMiddleware an interface for message filtering and modification.
type MessageLockerByType ¶
func NewMessageLockerByType ¶
func NewMessageLockerByType(ctx context.Context) *MessageLockerByType
NewMessageLockerByType is a constructor for MessageLockerByType.
func (*MessageLockerByType) GetMessagesFilters ¶
func (ml *MessageLockerByType) GetMessagesFilters(ctx context.Context, in *introproto.EmptyArgs) (*introproto.AllMessageFilterStats, error)
GetMessagesFilters returns filter state and statistic per message type (as map).
func (*MessageLockerByType) SetMessagesFilter ¶
func (ml *MessageLockerByType) SetMessagesFilter(ctx context.Context, in *introproto.MessageFilterByType) (*introproto.MessageFilterByType, error)
SetMessagesFilter sets filter for provided message type.
type MessageStatByType ¶
MessageStatByType holds publish statistic per message type.
func NewMessageStatByType ¶
func NewMessageStatByType() *MessageStatByType
NewMessageStatByType is a constructor for MessageStatByType.
func (*MessageStatByType) GetMessagesStat ¶
func (ms *MessageStatByType) GetMessagesStat(context.Context, *introproto.EmptyArgs) (*introproto.AllMessageStatByType, error)
GetMessagesStat returns publish statistic per message type.
type PublisherService ¶
type PublisherService struct { *MessageLockerByType *MessageStatByType }
PublisherService implements introproto.PublisherServer.
func NewPublisherService ¶
func NewPublisherService(ml *MessageLockerByType, ms *MessageStatByType) PublisherService
NewPublisherService creates PublisherService.
type PublisherWrapper ¶
type PublisherWrapper struct {
// contains filtered or unexported fields
}
PublisherWrapper wraps message Publisher.
func NewPublisherWrapper ¶
func NewPublisherWrapper(pb message.Publisher) *PublisherWrapper
NewPublisherWrapper creates new message.Publisher wrapper.
func (*PublisherWrapper) Close ¶
func (p *PublisherWrapper) Close() error
Close wraps message.Close method.
func (*PublisherWrapper) Middleware ¶
func (p *PublisherWrapper) Middleware(fm ...FilterMiddleware)
Middleware adds middleware filters (order matters!).