lmq

package module
v0.0.0-...-befc716 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

README

lmq

Documentation

Index

Constants

View Source
const (
	RpcPathSetTopic      = "/SetTopic"
	RpcPathGetTopic      = "/GetTopic"
	RpcPathListTopic     = "/ListTopic"
	RpcPathDeleteTopic   = "/DeleteTopic"
	RpcPathSetChannel    = "/SetChannel"
	RpcPathGetChannel    = "/GetChannel"
	RpcPathDeleteChannel = "/DeleteChannel"
	RpcPathPub           = "/Pub"
	RpcPathBatchPub      = "/BatchPub"
	RpcPathPopMessage    = "/PopMessage"
	RpcPathFinishMessage = "/FinishMessage"
)
View Source
const (
	ServerName = "lmq"
)

Variables

View Source
var (
	ErrCode_name = map[int32]string{
		0:     "Success",
		30000: "TopicNotFound",
		30001: "ChannelNotFound",
		30002: "MessageTooLarge",
		30003: "QueueEmpty",
	}
	ErrCode_value = map[string]int32{
		"Success":         0,
		"TopicNotFound":   30000,
		"ChannelNotFound": 30001,
		"MessageTooLarge": 30002,
		"QueueEmpty":      30003,
	}
)

Enum value maps for ErrCode.

Functions

This section is empty.

Types

type BatchPubReq

type BatchPubReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// 可选的,如果存在则表示给单一 channel 推送
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	// @validate: required,min=1
	MsgList        []*Message `protobuf:"bytes,3,rep,name=msg_list,json=msgList,proto3" json:"msg_list,omitempty" validate:"required,min=1"`
	BreakWhenError bool       `protobuf:"varint,4,opt,name=break_when_error,json=breakWhenError,proto3" json:"break_when_error,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchPubReq) Descriptor deprecated

func (*BatchPubReq) Descriptor() ([]byte, []int)

Deprecated: Use BatchPubReq.ProtoReflect.Descriptor instead.

func (*BatchPubReq) GetBreakWhenError

func (x *BatchPubReq) GetBreakWhenError() bool

func (*BatchPubReq) GetChannelName

func (x *BatchPubReq) GetChannelName() string

func (*BatchPubReq) GetMsgList

func (x *BatchPubReq) GetMsgList() []*Message

func (*BatchPubReq) GetTopicName

func (x *BatchPubReq) GetTopicName() string

func (*BatchPubReq) ProtoMessage

func (*BatchPubReq) ProtoMessage()

func (*BatchPubReq) ProtoReflect

func (x *BatchPubReq) ProtoReflect() protoreflect.Message

func (*BatchPubReq) Reset

func (x *BatchPubReq) Reset()

func (*BatchPubReq) String

func (x *BatchPubReq) String() string

type BatchPubRsp

type BatchPubRsp struct {
	MsgIdList []string `protobuf:"bytes,1,rep,name=msg_id_list,json=msgIdList,proto3" json:"msg_id_list,omitempty"`
	// contains filtered or unexported fields
}

func BatchPub

func BatchPub(ctx *lrpc.Ctx, req *BatchPubReq) (*BatchPubRsp, error)

func (*BatchPubRsp) Descriptor deprecated

func (*BatchPubRsp) Descriptor() ([]byte, []int)

Deprecated: Use BatchPubRsp.ProtoReflect.Descriptor instead.

func (*BatchPubRsp) GetMsgIdList

func (x *BatchPubRsp) GetMsgIdList() []string

func (*BatchPubRsp) ProtoMessage

func (*BatchPubRsp) ProtoMessage()

func (*BatchPubRsp) ProtoReflect

func (x *BatchPubRsp) ProtoReflect() protoreflect.Message

func (*BatchPubRsp) Reset

func (x *BatchPubRsp) Reset()

func (*BatchPubRsp) String

func (x *BatchPubRsp) String() string

type Channel

type Channel struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// @validate: required
	Client *core.ServiceDiscoveryClient `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty" validate:"required"`
	// 最大并发数
	ConcurrentCount uint32 `protobuf:"varint,11,opt,name=concurrent_count,json=concurrentCount,proto3" json:"concurrent_count,omitempty"`
	// 最大重试次数
	MaxRetryCount uint32 `protobuf:"varint,12,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"`
	// 最大执行时间
	MaxExecTime *durationpb.Duration `protobuf:"bytes,13,opt,name=max_exec_time,json=maxExecTime,proto3" json:"max_exec_time,omitempty"`
	// 消息延期执行时间
	DelayTime *durationpb.Duration `protobuf:"bytes,14,opt,name=delay_time,json=delayTime,proto3" json:"delay_time,omitempty"`
	// 消息过期时间
	ExpiryTime *durationpb.Duration `protobuf:"bytes,15,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"`
	// 最小重试间隔
	MinRetryInterval *durationpb.Duration `protobuf:"bytes,16,opt,name=min_retry_interval,json=minRetryInterval,proto3" json:"min_retry_interval,omitempty"`
	// 最大重试间隔
	MaxRetryInterval *durationpb.Duration `protobuf:"bytes,17,opt,name=max_retry_interval,json=maxRetryInterval,proto3" json:"max_retry_interval,omitempty"`
	// 指定消费的 tags
	TagList []string `protobuf:"bytes,18,rep,name=tag_list,json=tagList,proto3" json:"tag_list,omitempty"`
	// contains filtered or unexported fields
}

func (*Channel) Descriptor deprecated

func (*Channel) Descriptor() ([]byte, []int)

Deprecated: Use Channel.ProtoReflect.Descriptor instead.

func (*Channel) GetClient

func (x *Channel) GetClient() *core.ServiceDiscoveryClient

func (*Channel) GetConcurrentCount

func (x *Channel) GetConcurrentCount() uint32

func (*Channel) GetDelayTime

func (x *Channel) GetDelayTime() *durationpb.Duration

func (*Channel) GetExpiryTime

func (x *Channel) GetExpiryTime() *durationpb.Duration

func (*Channel) GetMaxExecTime

func (x *Channel) GetMaxExecTime() *durationpb.Duration

func (*Channel) GetMaxRetryCount

func (x *Channel) GetMaxRetryCount() uint32

func (*Channel) GetMaxRetryInterval

func (x *Channel) GetMaxRetryInterval() *durationpb.Duration

func (*Channel) GetMinRetryInterval

func (x *Channel) GetMinRetryInterval() *durationpb.Duration

func (*Channel) GetName

func (x *Channel) GetName() string

func (*Channel) GetTagList

func (x *Channel) GetTagList() []string

func (*Channel) ProtoMessage

func (*Channel) ProtoMessage()

func (*Channel) ProtoReflect

func (x *Channel) ProtoReflect() protoreflect.Message

func (*Channel) Reset

func (x *Channel) Reset()

func (*Channel) String

func (x *Channel) String() string

type ConsumeReq

type ConsumeReq struct {
	Msg *QueuePop `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumeReq) Descriptor deprecated

func (*ConsumeReq) Descriptor() ([]byte, []int)

Deprecated: Use ConsumeReq.ProtoReflect.Descriptor instead.

func (*ConsumeReq) GetMsg

func (x *ConsumeReq) GetMsg() *QueuePop

func (*ConsumeReq) ProtoMessage

func (*ConsumeReq) ProtoMessage()

func (*ConsumeReq) ProtoReflect

func (x *ConsumeReq) ProtoReflect() protoreflect.Message

func (*ConsumeReq) Reset

func (x *ConsumeReq) Reset()

func (*ConsumeReq) String

func (x *ConsumeReq) String() string

type ConsumeRsp

type ConsumeRsp struct {
	Msg *QueueDone `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumeRsp) Descriptor deprecated

func (*ConsumeRsp) Descriptor() ([]byte, []int)

Deprecated: Use ConsumeRsp.ProtoReflect.Descriptor instead.

func (*ConsumeRsp) GetMsg

func (x *ConsumeRsp) GetMsg() *QueueDone

func (*ConsumeRsp) ProtoMessage

func (*ConsumeRsp) ProtoMessage()

func (*ConsumeRsp) ProtoReflect

func (x *ConsumeRsp) ProtoReflect() protoreflect.Message

func (*ConsumeRsp) Reset

func (x *ConsumeRsp) Reset()

func (*ConsumeRsp) String

func (x *ConsumeRsp) String() string

type DeleteChannelReq

type DeleteChannelReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// @validate: required
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*DeleteChannelReq) Descriptor deprecated

func (*DeleteChannelReq) Descriptor() ([]byte, []int)

Deprecated: Use DeleteChannelReq.ProtoReflect.Descriptor instead.

func (*DeleteChannelReq) GetChannelName

func (x *DeleteChannelReq) GetChannelName() string

func (*DeleteChannelReq) GetTopicName

func (x *DeleteChannelReq) GetTopicName() string

func (*DeleteChannelReq) ProtoMessage

func (*DeleteChannelReq) ProtoMessage()

func (*DeleteChannelReq) ProtoReflect

func (x *DeleteChannelReq) ProtoReflect() protoreflect.Message

func (*DeleteChannelReq) Reset

func (x *DeleteChannelReq) Reset()

func (*DeleteChannelReq) String

func (x *DeleteChannelReq) String() string

type DeleteChannelRsp

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

func DeleteChannel

func DeleteChannel(ctx *lrpc.Ctx, req *DeleteChannelReq) (*DeleteChannelRsp, error)

func (*DeleteChannelRsp) Descriptor deprecated

func (*DeleteChannelRsp) Descriptor() ([]byte, []int)

Deprecated: Use DeleteChannelRsp.ProtoReflect.Descriptor instead.

func (*DeleteChannelRsp) ProtoMessage

func (*DeleteChannelRsp) ProtoMessage()

func (*DeleteChannelRsp) ProtoReflect

func (x *DeleteChannelRsp) ProtoReflect() protoreflect.Message

func (*DeleteChannelRsp) Reset

func (x *DeleteChannelRsp) Reset()

func (*DeleteChannelRsp) String

func (x *DeleteChannelRsp) String() string

type DeleteTopicReq

type DeleteTopicReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*DeleteTopicReq) Descriptor deprecated

func (*DeleteTopicReq) Descriptor() ([]byte, []int)

Deprecated: Use DeleteTopicReq.ProtoReflect.Descriptor instead.

func (*DeleteTopicReq) GetTopicName

func (x *DeleteTopicReq) GetTopicName() string

func (*DeleteTopicReq) ProtoMessage

func (*DeleteTopicReq) ProtoMessage()

func (*DeleteTopicReq) ProtoReflect

func (x *DeleteTopicReq) ProtoReflect() protoreflect.Message

func (*DeleteTopicReq) Reset

func (x *DeleteTopicReq) Reset()

func (*DeleteTopicReq) String

func (x *DeleteTopicReq) String() string

type DeleteTopicRsp

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

func DeleteTopic

func DeleteTopic(ctx *lrpc.Ctx, req *DeleteTopicReq) (*DeleteTopicRsp, error)

func (*DeleteTopicRsp) Descriptor deprecated

func (*DeleteTopicRsp) Descriptor() ([]byte, []int)

Deprecated: Use DeleteTopicRsp.ProtoReflect.Descriptor instead.

func (*DeleteTopicRsp) ProtoMessage

func (*DeleteTopicRsp) ProtoMessage()

func (*DeleteTopicRsp) ProtoReflect

func (x *DeleteTopicRsp) ProtoReflect() protoreflect.Message

func (*DeleteTopicRsp) Reset

func (x *DeleteTopicRsp) Reset()

func (*DeleteTopicRsp) String

func (x *DeleteTopicRsp) String() string

type DiskQueue

type DiskQueue struct {
	MaxFilePartSize uint64 `protobuf:"varint,1,opt,name=max_file_part_size,json=maxFilePartSize,proto3" json:"max_file_part_size,omitempty"`
	// contains filtered or unexported fields
}

func (*DiskQueue) Descriptor deprecated

func (*DiskQueue) Descriptor() ([]byte, []int)

Deprecated: Use DiskQueue.ProtoReflect.Descriptor instead.

func (*DiskQueue) GetMaxFilePartSize

func (x *DiskQueue) GetMaxFilePartSize() uint64

func (*DiskQueue) ProtoMessage

func (*DiskQueue) ProtoMessage()

func (*DiskQueue) ProtoReflect

func (x *DiskQueue) ProtoReflect() protoreflect.Message

func (*DiskQueue) Reset

func (x *DiskQueue) Reset()

func (*DiskQueue) String

func (x *DiskQueue) String() string

type ErrCode

type ErrCode int32

@range: 30000-30200

const (
	ErrCode_Success         ErrCode = 0
	ErrCode_TopicNotFound   ErrCode = 30000 // topic not found
	ErrCode_ChannelNotFound ErrCode = 30001 // channel not found
	ErrCode_MessageTooLarge ErrCode = 30002 // message too large
	ErrCode_QueueEmpty      ErrCode = 30003 // queue is empty
)

func (ErrCode) Descriptor

func (ErrCode) Descriptor() protoreflect.EnumDescriptor

func (ErrCode) Enum

func (x ErrCode) Enum() *ErrCode

func (ErrCode) EnumDescriptor deprecated

func (ErrCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrCode.Descriptor instead.

func (ErrCode) Number

func (x ErrCode) Number() protoreflect.EnumNumber

func (ErrCode) String

func (x ErrCode) String() string

func (ErrCode) Type

func (ErrCode) Type() protoreflect.EnumType

type FinishMessageReq

type FinishMessageReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// @validate: required
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty" validate:"required"`
	// @validate: required
	Msg *QueueDone `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*FinishMessageReq) Descriptor deprecated

func (*FinishMessageReq) Descriptor() ([]byte, []int)

Deprecated: Use FinishMessageReq.ProtoReflect.Descriptor instead.

func (*FinishMessageReq) GetChannelName

func (x *FinishMessageReq) GetChannelName() string

func (*FinishMessageReq) GetMsg

func (x *FinishMessageReq) GetMsg() *QueueDone

func (*FinishMessageReq) GetTopicName

func (x *FinishMessageReq) GetTopicName() string

func (*FinishMessageReq) ProtoMessage

func (*FinishMessageReq) ProtoMessage()

func (*FinishMessageReq) ProtoReflect

func (x *FinishMessageReq) ProtoReflect() protoreflect.Message

func (*FinishMessageReq) Reset

func (x *FinishMessageReq) Reset()

func (*FinishMessageReq) String

func (x *FinishMessageReq) String() string

type FinishMessageRsp

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

func FinishMessage

func FinishMessage(ctx *lrpc.Ctx, req *FinishMessageReq) (*FinishMessageRsp, error)

func (*FinishMessageRsp) Descriptor deprecated

func (*FinishMessageRsp) Descriptor() ([]byte, []int)

Deprecated: Use FinishMessageRsp.ProtoReflect.Descriptor instead.

func (*FinishMessageRsp) ProtoMessage

func (*FinishMessageRsp) ProtoMessage()

func (*FinishMessageRsp) ProtoReflect

func (x *FinishMessageRsp) ProtoReflect() protoreflect.Message

func (*FinishMessageRsp) Reset

func (x *FinishMessageRsp) Reset()

func (*FinishMessageRsp) String

func (x *FinishMessageRsp) String() string

type GetChannelReq

type GetChannelReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// @validate: required
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*GetChannelReq) Descriptor deprecated

func (*GetChannelReq) Descriptor() ([]byte, []int)

Deprecated: Use GetChannelReq.ProtoReflect.Descriptor instead.

func (*GetChannelReq) GetChannelName

func (x *GetChannelReq) GetChannelName() string

func (*GetChannelReq) GetTopicName

func (x *GetChannelReq) GetTopicName() string

func (*GetChannelReq) ProtoMessage

func (*GetChannelReq) ProtoMessage()

func (*GetChannelReq) ProtoReflect

func (x *GetChannelReq) ProtoReflect() protoreflect.Message

func (*GetChannelReq) Reset

func (x *GetChannelReq) Reset()

func (*GetChannelReq) String

func (x *GetChannelReq) String() string

type GetChannelRsp

type GetChannelRsp struct {
	Channel *Channel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

func GetChannel

func GetChannel(ctx *lrpc.Ctx, req *GetChannelReq) (*GetChannelRsp, error)

func (*GetChannelRsp) Descriptor deprecated

func (*GetChannelRsp) Descriptor() ([]byte, []int)

Deprecated: Use GetChannelRsp.ProtoReflect.Descriptor instead.

func (*GetChannelRsp) GetChannel

func (x *GetChannelRsp) GetChannel() *Channel

func (*GetChannelRsp) ProtoMessage

func (*GetChannelRsp) ProtoMessage()

func (*GetChannelRsp) ProtoReflect

func (x *GetChannelRsp) ProtoReflect() protoreflect.Message

func (*GetChannelRsp) Reset

func (x *GetChannelRsp) Reset()

func (*GetChannelRsp) String

func (x *GetChannelRsp) String() string

type GetTopicReq

type GetTopicReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	ShowDepth bool   `protobuf:"varint,2,opt,name=show_depth,json=showDepth,proto3" json:"show_depth,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTopicReq) Descriptor deprecated

func (*GetTopicReq) Descriptor() ([]byte, []int)

Deprecated: Use GetTopicReq.ProtoReflect.Descriptor instead.

func (*GetTopicReq) GetShowDepth

func (x *GetTopicReq) GetShowDepth() bool

func (*GetTopicReq) GetTopicName

func (x *GetTopicReq) GetTopicName() string

func (*GetTopicReq) ProtoMessage

func (*GetTopicReq) ProtoMessage()

func (*GetTopicReq) ProtoReflect

func (x *GetTopicReq) ProtoReflect() protoreflect.Message

func (*GetTopicReq) Reset

func (x *GetTopicReq) Reset()

func (*GetTopicReq) String

func (x *GetTopicReq) String() string

type GetTopicRsp

type GetTopicRsp struct {
	Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Depth int64  `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
	// contains filtered or unexported fields
}

func GetTopic

func GetTopic(ctx *lrpc.Ctx, req *GetTopicReq) (*GetTopicRsp, error)

func (*GetTopicRsp) Descriptor deprecated

func (*GetTopicRsp) Descriptor() ([]byte, []int)

Deprecated: Use GetTopicRsp.ProtoReflect.Descriptor instead.

func (*GetTopicRsp) GetDepth

func (x *GetTopicRsp) GetDepth() int64

func (*GetTopicRsp) GetTopic

func (x *GetTopicRsp) GetTopic() *Topic

func (*GetTopicRsp) ProtoMessage

func (*GetTopicRsp) ProtoMessage()

func (*GetTopicRsp) ProtoReflect

func (x *GetTopicRsp) ProtoReflect() protoreflect.Message

func (*GetTopicRsp) Reset

func (x *GetTopicRsp) Reset()

func (*GetTopicRsp) String

func (x *GetTopicRsp) String() string

type ListTopicReq

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

func (*ListTopicReq) Descriptor deprecated

func (*ListTopicReq) Descriptor() ([]byte, []int)

Deprecated: Use ListTopicReq.ProtoReflect.Descriptor instead.

func (*ListTopicReq) ProtoMessage

func (*ListTopicReq) ProtoMessage()

func (*ListTopicReq) ProtoReflect

func (x *ListTopicReq) ProtoReflect() protoreflect.Message

func (*ListTopicReq) Reset

func (x *ListTopicReq) Reset()

func (*ListTopicReq) String

func (x *ListTopicReq) String() string

type ListTopicRsp

type ListTopicRsp struct {
	TopicList []*Topic `protobuf:"bytes,1,rep,name=topic_list,json=topicList,proto3" json:"topic_list,omitempty"`
	// contains filtered or unexported fields
}

func ListTopic

func ListTopic(ctx *lrpc.Ctx, req *ListTopicReq) (*ListTopicRsp, error)

func (*ListTopicRsp) Descriptor deprecated

func (*ListTopicRsp) Descriptor() ([]byte, []int)

Deprecated: Use ListTopicRsp.ProtoReflect.Descriptor instead.

func (*ListTopicRsp) GetTopicList

func (x *ListTopicRsp) GetTopicList() []*Topic

func (*ListTopicRsp) ProtoMessage

func (*ListTopicRsp) ProtoMessage()

func (*ListTopicRsp) ProtoReflect

func (x *ListTopicRsp) ProtoReflect() protoreflect.Message

func (*ListTopicRsp) Reset

func (x *ListTopicRsp) Reset()

func (*ListTopicRsp) String

func (x *ListTopicRsp) String() string

type Message

type Message struct {
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	MsgId     string                 `protobuf:"bytes,2,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	// @validate: required
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty" validate:"required"`
	// 可以指定某一个 channel 只消费特定 tags
	TagList []string `protobuf:"bytes,4,rep,name=tag_list,json=tagList,proto3" json:"tag_list,omitempty"`
	// 用于单一 channel 内的穿行话,防止多资源间的抢占
	Hash uint32 `protobuf:"varint,5,opt,name=hash,proto3" json:"hash,omitempty"`
	// 重试计数
	RetryCount uint32 `protobuf:"varint,6,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
	// 最大重试次数
	MaxRetryCount uint32 `protobuf:"varint,9,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"`
	// 最大执行时间
	MaxExecTime *durationpb.Duration `protobuf:"bytes,10,opt,name=max_exec_time,json=maxExecTime,proto3" json:"max_exec_time,omitempty"`
	// 最早的执行时间
	ExecAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=exec_at,json=execAt,proto3" json:"exec_at,omitempty"`
	// 过期时间
	ExpireAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetCreatedAt

func (x *Message) GetCreatedAt() *timestamppb.Timestamp

func (*Message) GetData

func (x *Message) GetData() []byte

func (*Message) GetExecAt

func (x *Message) GetExecAt() *timestamppb.Timestamp

func (*Message) GetExpireAt

func (x *Message) GetExpireAt() *timestamppb.Timestamp

func (*Message) GetHash

func (x *Message) GetHash() uint32

func (*Message) GetMaxExecTime

func (x *Message) GetMaxExecTime() *durationpb.Duration

func (*Message) GetMaxRetryCount

func (x *Message) GetMaxRetryCount() uint32

func (*Message) GetMsgId

func (x *Message) GetMsgId() string

func (*Message) GetRetryCount

func (x *Message) GetRetryCount() uint32

func (*Message) GetTagList

func (x *Message) GetTagList() []string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type PopMessageReq

type PopMessageReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// @validate: required
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*PopMessageReq) Descriptor deprecated

func (*PopMessageReq) Descriptor() ([]byte, []int)

Deprecated: Use PopMessageReq.ProtoReflect.Descriptor instead.

func (*PopMessageReq) GetChannelName

func (x *PopMessageReq) GetChannelName() string

func (*PopMessageReq) GetTopicName

func (x *PopMessageReq) GetTopicName() string

func (*PopMessageReq) ProtoMessage

func (*PopMessageReq) ProtoMessage()

func (*PopMessageReq) ProtoReflect

func (x *PopMessageReq) ProtoReflect() protoreflect.Message

func (*PopMessageReq) Reset

func (x *PopMessageReq) Reset()

func (*PopMessageReq) String

func (x *PopMessageReq) String() string

type PopMessageRsp

type PopMessageRsp struct {
	Msg *QueuePop `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func PopMessage

func PopMessage(ctx *lrpc.Ctx, req *PopMessageReq) (*PopMessageRsp, error)

func (*PopMessageRsp) Descriptor deprecated

func (*PopMessageRsp) Descriptor() ([]byte, []int)

Deprecated: Use PopMessageRsp.ProtoReflect.Descriptor instead.

func (*PopMessageRsp) GetMsg

func (x *PopMessageRsp) GetMsg() *QueuePop

func (*PopMessageRsp) ProtoMessage

func (*PopMessageRsp) ProtoMessage()

func (*PopMessageRsp) ProtoReflect

func (x *PopMessageRsp) ProtoReflect() protoreflect.Message

func (*PopMessageRsp) Reset

func (x *PopMessageRsp) Reset()

func (*PopMessageRsp) String

func (x *PopMessageRsp) String() string

type PubReq

type PubReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// 可选的,如果存在则表示给单一 channel 推送
	ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	// @validate: required
	Msg *Message `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*PubReq) Descriptor deprecated

func (*PubReq) Descriptor() ([]byte, []int)

Deprecated: Use PubReq.ProtoReflect.Descriptor instead.

func (*PubReq) GetChannelName

func (x *PubReq) GetChannelName() string

func (*PubReq) GetMsg

func (x *PubReq) GetMsg() *Message

func (*PubReq) GetTopicName

func (x *PubReq) GetTopicName() string

func (*PubReq) ProtoMessage

func (*PubReq) ProtoMessage()

func (*PubReq) ProtoReflect

func (x *PubReq) ProtoReflect() protoreflect.Message

func (*PubReq) Reset

func (x *PubReq) Reset()

func (*PubReq) String

func (x *PubReq) String() string

type PubRsp

type PubRsp struct {
	MsgId string `protobuf:"bytes,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	// contains filtered or unexported fields
}

func Pub

func Pub(ctx *lrpc.Ctx, req *PubReq) (*PubRsp, error)

func (*PubRsp) Descriptor deprecated

func (*PubRsp) Descriptor() ([]byte, []int)

Deprecated: Use PubRsp.ProtoReflect.Descriptor instead.

func (*PubRsp) GetMsgId

func (x *PubRsp) GetMsgId() string

func (*PubRsp) ProtoMessage

func (*PubRsp) ProtoMessage()

func (*PubRsp) ProtoReflect

func (x *PubRsp) ProtoReflect() protoreflect.Message

func (*PubRsp) Reset

func (x *PubRsp) Reset()

func (*PubRsp) String

func (x *PubRsp) String() string

type QueueDone

type QueueDone struct {
	MsgId          string               `protobuf:"bytes,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	NeedRetry      bool                 `protobuf:"varint,2,opt,name=need_retry,json=needRetry,proto3" json:"need_retry,omitempty"`
	SkipRetryCount bool                 `protobuf:"varint,3,opt,name=skip_retry_count,json=skipRetryCount,proto3" json:"skip_retry_count,omitempty"`
	RetryWait      *durationpb.Duration `protobuf:"bytes,4,opt,name=retry_wait,json=retryWait,proto3" json:"retry_wait,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueDone) Descriptor deprecated

func (*QueueDone) Descriptor() ([]byte, []int)

Deprecated: Use QueueDone.ProtoReflect.Descriptor instead.

func (*QueueDone) GetMsgId

func (x *QueueDone) GetMsgId() string

func (*QueueDone) GetNeedRetry

func (x *QueueDone) GetNeedRetry() bool

func (*QueueDone) GetRetryWait

func (x *QueueDone) GetRetryWait() *durationpb.Duration

func (*QueueDone) GetSkipRetryCount

func (x *QueueDone) GetSkipRetryCount() bool

func (*QueueDone) ProtoMessage

func (*QueueDone) ProtoMessage()

func (*QueueDone) ProtoReflect

func (x *QueueDone) ProtoReflect() protoreflect.Message

func (*QueueDone) Reset

func (x *QueueDone) Reset()

func (*QueueDone) String

func (x *QueueDone) String() string

type QueuePop

type QueuePop struct {
	CreatedAt  *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	RetryCount uint32                 `protobuf:"varint,2,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
	Data       []byte                 `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	MsgId      string                 `protobuf:"bytes,4,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	// 最大重试次数,业务可以根据这个字段做一些临界处理
	MaxRetryCount uint32 `protobuf:"varint,5,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"`
	// contains filtered or unexported fields
}

func (*QueuePop) Descriptor deprecated

func (*QueuePop) Descriptor() ([]byte, []int)

Deprecated: Use QueuePop.ProtoReflect.Descriptor instead.

func (*QueuePop) GetCreatedAt

func (x *QueuePop) GetCreatedAt() *timestamppb.Timestamp

func (*QueuePop) GetData

func (x *QueuePop) GetData() []byte

func (*QueuePop) GetMaxRetryCount

func (x *QueuePop) GetMaxRetryCount() uint32

func (*QueuePop) GetMsgId

func (x *QueuePop) GetMsgId() string

func (*QueuePop) GetRetryCount

func (x *QueuePop) GetRetryCount() uint32

func (*QueuePop) ProtoMessage

func (*QueuePop) ProtoMessage()

func (*QueuePop) ProtoReflect

func (x *QueuePop) ProtoReflect() protoreflect.Message

func (*QueuePop) Reset

func (x *QueuePop) Reset()

func (*QueuePop) String

func (x *QueuePop) String() string

type SetChannelReq

type SetChannelReq struct {

	// @validate: required
	TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty" validate:"required"`
	// @validate: required
	Channel *Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*SetChannelReq) Descriptor deprecated

func (*SetChannelReq) Descriptor() ([]byte, []int)

Deprecated: Use SetChannelReq.ProtoReflect.Descriptor instead.

func (*SetChannelReq) GetChannel

func (x *SetChannelReq) GetChannel() *Channel

func (*SetChannelReq) GetTopicName

func (x *SetChannelReq) GetTopicName() string

func (*SetChannelReq) ProtoMessage

func (*SetChannelReq) ProtoMessage()

func (*SetChannelReq) ProtoReflect

func (x *SetChannelReq) ProtoReflect() protoreflect.Message

func (*SetChannelReq) Reset

func (x *SetChannelReq) Reset()

func (*SetChannelReq) String

func (x *SetChannelReq) String() string

type SetChannelRsp

type SetChannelRsp struct {
	Channel *Channel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

func SetChannel

func SetChannel(ctx *lrpc.Ctx, req *SetChannelReq) (*SetChannelRsp, error)

func (*SetChannelRsp) Descriptor deprecated

func (*SetChannelRsp) Descriptor() ([]byte, []int)

Deprecated: Use SetChannelRsp.ProtoReflect.Descriptor instead.

func (*SetChannelRsp) GetChannel

func (x *SetChannelRsp) GetChannel() *Channel

func (*SetChannelRsp) ProtoMessage

func (*SetChannelRsp) ProtoMessage()

func (*SetChannelRsp) ProtoReflect

func (x *SetChannelRsp) ProtoReflect() protoreflect.Message

func (*SetChannelRsp) Reset

func (x *SetChannelRsp) Reset()

func (*SetChannelRsp) String

func (x *SetChannelRsp) String() string

type SetTopicReq

type SetTopicReq struct {

	// @validate: required
	Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*SetTopicReq) Descriptor deprecated

func (*SetTopicReq) Descriptor() ([]byte, []int)

Deprecated: Use SetTopicReq.ProtoReflect.Descriptor instead.

func (*SetTopicReq) GetTopic

func (x *SetTopicReq) GetTopic() *Topic

func (*SetTopicReq) ProtoMessage

func (*SetTopicReq) ProtoMessage()

func (*SetTopicReq) ProtoReflect

func (x *SetTopicReq) ProtoReflect() protoreflect.Message

func (*SetTopicReq) Reset

func (x *SetTopicReq) Reset()

func (*SetTopicReq) String

func (x *SetTopicReq) String() string

type SetTopicRsp

type SetTopicRsp struct {
	Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	// contains filtered or unexported fields
}

func SetTopic

func SetTopic(ctx *lrpc.Ctx, req *SetTopicReq) (*SetTopicRsp, error)

func (*SetTopicRsp) Descriptor deprecated

func (*SetTopicRsp) Descriptor() ([]byte, []int)

Deprecated: Use SetTopicRsp.ProtoReflect.Descriptor instead.

func (*SetTopicRsp) GetTopic

func (x *SetTopicRsp) GetTopic() *Topic

func (*SetTopicRsp) ProtoMessage

func (*SetTopicRsp) ProtoMessage()

func (*SetTopicRsp) ProtoReflect

func (x *SetTopicRsp) ProtoReflect() protoreflect.Message

func (*SetTopicRsp) Reset

func (x *SetTopicRsp) Reset()

func (*SetTopicRsp) String

func (x *SetTopicRsp) String() string

type Topic

type Topic struct {

	// @validate: required
	Name        string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" validate:"required"`
	CreatedAt   int64      `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   int64      `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	ChannelList []*Channel `protobuf:"bytes,4,rep,name=channel_list,json=channelList,proto3" json:"channel_list,omitempty"`
	DiskQueue   *DiskQueue `protobuf:"bytes,5,opt,name=disk_queue,json=diskQueue,proto3" json:"disk_queue,omitempty"`
	MaxMsgSize  uint64     `protobuf:"varint,6,opt,name=max_msg_size,json=maxMsgSize,proto3" json:"max_msg_size,omitempty"`
	// contains filtered or unexported fields
}

func (*Topic) Descriptor deprecated

func (*Topic) Descriptor() ([]byte, []int)

Deprecated: Use Topic.ProtoReflect.Descriptor instead.

func (*Topic) GetChannelList

func (x *Topic) GetChannelList() []*Channel

func (*Topic) GetCreatedAt

func (x *Topic) GetCreatedAt() int64

func (*Topic) GetDiskQueue

func (x *Topic) GetDiskQueue() *DiskQueue

func (*Topic) GetMaxMsgSize

func (x *Topic) GetMaxMsgSize() uint64

func (*Topic) GetName

func (x *Topic) GetName() string

func (*Topic) GetUpdatedAt

func (x *Topic) GetUpdatedAt() int64

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) ProtoReflect

func (x *Topic) ProtoReflect() protoreflect.Message

func (*Topic) Reset

func (x *Topic) Reset()

func (*Topic) String

func (x *Topic) String() string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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