Documentation ¶
Index ¶
- type NotificationOptions
- type NotificationSender
- func (s *NotificationSender) Notification(ctx context.Context, sendID, recvID string, contentType int32, m proto.Message, ...)
- func (s *NotificationSender) NotificationWithSessionType(ctx context.Context, sendID, recvID string, contentType, sessionType int32, ...)
- func (s *NotificationSender) SetOptionsByContentType(_ context.Context, options map[string]bool, contentType int32)
- type NotificationSenderOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationOptions ¶
type NotificationOptions func(*notificationOpt)
func WithRpcGetUserName ¶
func WithRpcGetUserName() NotificationOptions
type NotificationSender ¶
type NotificationSender struct {
// contains filtered or unexported fields
}
func NewNotificationSender ¶
func NewNotificationSender(conf *config.Notification, opts ...NotificationSenderOptions) *NotificationSender
func (*NotificationSender) Notification ¶
func (s *NotificationSender) Notification(ctx context.Context, sendID, recvID string, contentType int32, m proto.Message, opts ...NotificationOptions)
func (*NotificationSender) NotificationWithSessionType ¶
func (s *NotificationSender) NotificationWithSessionType(ctx context.Context, sendID, recvID string, contentType, sessionType int32, m proto.Message, opts ...NotificationOptions)
func (*NotificationSender) SetOptionsByContentType ¶
type NotificationSenderOptions ¶
type NotificationSenderOptions func(*NotificationSender)
func WithLocalSendMsg ¶
func WithLocalSendMsg(sendMsg func(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error)) NotificationSenderOptions
func WithQueue ¶
func WithQueue(queue *memamq.MemoryQueue) NotificationSenderOptions
func WithRpcClient ¶
func WithRpcClient(sendMsg func(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error)) NotificationSenderOptions
func WithUserRpcClient ¶
Click to show internal directories.
Click to hide internal directories.