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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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