rpcclient

package
v3.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func (s *NotificationSender) SetOptionsByContentType(_ context.Context, options map[string]bool, contentType int32)

type NotificationSenderOptions

type NotificationSenderOptions func(*NotificationSender)

func WithLocalSendMsg

func WithLocalSendMsg(sendMsg func(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error)) NotificationSenderOptions

func WithRpcClient

func WithRpcClient(sendMsg func(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error)) NotificationSenderOptions

func WithUserRpcClient

func WithUserRpcClient(getUserInfo func(ctx context.Context, userID string) (*sdkws.UserInfo, error)) NotificationSenderOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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