push

package
v3.8.2-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContent

func GetContent(msg *sdkws.MsgData) string

func Start

func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error

Types

type Config added in v3.7.0

type Config struct {
	RpcConfig          config.Push
	RedisConfig        config.Redis
	KafkaConfig        config.Kafka
	NotificationConfig config.Notification
	Share              config.Share
	WebhooksConfig     config.Webhooks
	LocalCacheConfig   config.LocalCache
	Discovery          config.Discovery
	FcmConfigPath      string
}

type ConsumerHandler

type ConsumerHandler struct {
	// contains filtered or unexported fields
}

func NewConsumerHandler

func NewConsumerHandler(config *Config, database controller.PushDatabase, offlinePusher offlinepush.OfflinePusher, rdb redis.UniversalClient,
	client discovery.SvcDiscoveryRegistry) (*ConsumerHandler, error)

func (*ConsumerHandler) Cleanup

func (*ConsumerHandler) ConsumeClaim

func (*ConsumerHandler) DeleteMemberAndSetConversationSeq added in v3.7.0

func (c *ConsumerHandler) DeleteMemberAndSetConversationSeq(ctx context.Context, groupID string, userIDs []string) error

func (*ConsumerHandler) GetConnsAndOnlinePush added in v3.8.0

func (c *ConsumerHandler) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, pushToUserIDs []string) ([]*msggateway.SingleMsgToUserResults, error)

func (*ConsumerHandler) Push2Group added in v3.7.1

func (c *ConsumerHandler) Push2Group(ctx context.Context, groupID string, msg *sdkws.MsgData) (err error)

func (*ConsumerHandler) Push2User added in v3.7.0

func (c *ConsumerHandler) Push2User(ctx context.Context, userIDs []string, msg *sdkws.MsgData) (err error)

Push2User Suitable for two types of conversations, one is SingleChatType and the other is NotificationChatType.

func (*ConsumerHandler) Setup

type DefaultAllNode added in v3.7.0

type DefaultAllNode struct {
	// contains filtered or unexported fields
}

func NewDefaultAllNode added in v3.7.0

func NewDefaultAllNode(disCov discovery.SvcDiscoveryRegistry, config *Config) *DefaultAllNode

func (*DefaultAllNode) GetConnsAndOnlinePush added in v3.7.0

func (d *DefaultAllNode) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
	pushToUserIDs []string) (wsResults []*msggateway.SingleMsgToUserResults, err error)

func (*DefaultAllNode) GetOnlinePushFailedUserIDs added in v3.7.0

func (d *DefaultAllNode) GetOnlinePushFailedUserIDs(_ context.Context, msg *sdkws.MsgData,
	wsResults []*msggateway.SingleMsgToUserResults, pushToUserIDs *[]string) []string

type K8sStaticConsistentHash added in v3.7.0

type K8sStaticConsistentHash struct {
	// contains filtered or unexported fields
}

func NewK8sStaticConsistentHash added in v3.7.0

func NewK8sStaticConsistentHash(disCov discovery.SvcDiscoveryRegistry, config *Config) *K8sStaticConsistentHash

func (*K8sStaticConsistentHash) GetConnsAndOnlinePush added in v3.7.0

func (k *K8sStaticConsistentHash) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
	pushToUserIDs []string) (wsResults []*msggateway.SingleMsgToUserResults, err error)

func (*K8sStaticConsistentHash) GetOnlinePushFailedUserIDs added in v3.7.0

func (k *K8sStaticConsistentHash) GetOnlinePushFailedUserIDs(_ context.Context, _ *sdkws.MsgData,
	wsResults []*msggateway.SingleMsgToUserResults, _ *[]string) []string

type OfflinePushConsumerHandler added in v3.8.1

type OfflinePushConsumerHandler struct {
	OfflinePushConsumerGroup *kafka.MConsumerGroup
	// contains filtered or unexported fields
}

func NewOfflinePushConsumerHandler added in v3.8.1

func NewOfflinePushConsumerHandler(config *Config, offlinePusher offlinepush.OfflinePusher) (*OfflinePushConsumerHandler, error)

func (*OfflinePushConsumerHandler) Cleanup added in v3.8.1

func (*OfflinePushConsumerHandler) ConsumeClaim added in v3.8.1

func (*OfflinePushConsumerHandler) Setup added in v3.8.1

type OnlinePusher added in v3.7.0

type OnlinePusher interface {
	GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
		pushToUserIDs []string) (wsResults []*msggateway.SingleMsgToUserResults, err error)
	GetOnlinePushFailedUserIDs(ctx context.Context, msg *sdkws.MsgData, wsResults []*msggateway.SingleMsgToUserResults,
		pushToUserIDs *[]string) []string
}

func NewOnlinePusher added in v3.7.0

func NewOnlinePusher(disCov discovery.SvcDiscoveryRegistry, config *Config) OnlinePusher

Directories

Path Synopsis
fcm

Jump to

Keyboard shortcuts

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