Documentation ¶
Index ¶
- func GetContent(msg *sdkws.MsgData) string
- func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, ...) error
- type Config
- type ConsumerHandler
- func (*ConsumerHandler) Cleanup(sarama.ConsumerGroupSession) error
- func (c *ConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
- func (c *ConsumerHandler) DeleteMemberAndSetConversationSeq(ctx context.Context, groupID string, userIDs []string) error
- func (c *ConsumerHandler) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, pushToUserIDs []string) ([]*msggateway.SingleMsgToUserResults, error)
- func (c *ConsumerHandler) Push2Group(ctx context.Context, groupID string, msg *sdkws.MsgData) (err error)
- func (c *ConsumerHandler) Push2User(ctx context.Context, userIDs []string, msg *sdkws.MsgData) (err error)
- func (*ConsumerHandler) Setup(sarama.ConsumerGroupSession) error
- type DefaultAllNode
- type K8sStaticConsistentHash
- type OfflinePushConsumerHandler
- type OnlinePusher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContent ¶
Types ¶
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) Cleanup(sarama.ConsumerGroupSession) error
func (*ConsumerHandler) ConsumeClaim ¶
func (c *ConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*ConsumerHandler) DeleteMemberAndSetConversationSeq ¶ added in v3.7.0
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 (*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 ¶
func (*ConsumerHandler) Setup(sarama.ConsumerGroupSession) error
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) Cleanup(sarama.ConsumerGroupSession) error
func (*OfflinePushConsumerHandler) ConsumeClaim ¶ added in v3.8.1
func (o *OfflinePushConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*OfflinePushConsumerHandler) Setup ¶ added in v3.8.1
func (*OfflinePushConsumerHandler) Setup(sarama.ConsumerGroupSession) error
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.