Documentation
¶
Index ¶
- Constants
- type GroupFrame
- func (p *GroupFrame) Ack(ctx context.Context, exec imparse.Exec) (int64, error)
- func (p *GroupFrame) AckBody() ([]byte, error)
- func (p *GroupFrame) Filter(ctx context.Context, db imparse.Cache, filters ...imparse.Filter) (uint64, error)
- func (p *GroupFrame) GetBase() *biz.Common
- func (p *GroupFrame) GetChannelType() biz.Channel
- func (p *GroupFrame) GetMsgType() biz.MsgType
- func (p *GroupFrame) PushBody() ([]byte, error)
- func (p *GroupFrame) Transport(ctx context.Context, exec imparse.Exec) error
- func (p *GroupFrame) Type() imparse.FrameType
- type Option
- type Options
- type PrivateFrame
- func (p *PrivateFrame) Ack(ctx context.Context, exec imparse.Exec) (int64, error)
- func (p *PrivateFrame) AckBody() ([]byte, error)
- func (p *PrivateFrame) Filter(ctx context.Context, db imparse.Cache, filters ...imparse.Filter) (uint64, error)
- func (p *PrivateFrame) GetBase() *biz.Common
- func (p *PrivateFrame) GetChannelType() biz.Channel
- func (p *PrivateFrame) GetMsgType() biz.MsgType
- func (p *PrivateFrame) PushBody() ([]byte, error)
- func (p *PrivateFrame) Transport(ctx context.Context, exec imparse.Exec) error
- func (p *PrivateFrame) Type() imparse.FrameType
- type SignalFrame
- func (p *SignalFrame) Ack(ctx context.Context, exec imparse.Exec) (int64, error)
- func (p *SignalFrame) AckBody() ([]byte, error)
- func (p *SignalFrame) Filter(ctx context.Context, db imparse.Cache, filters ...imparse.Filter) (uint64, error)
- func (p *SignalFrame) GetBase() *biz.Signal
- func (p *SignalFrame) PushBody() ([]byte, error)
- func (p *SignalFrame) Transport(ctx context.Context, exec imparse.Exec) error
- func (p *SignalFrame) Type() imparse.FrameType
- type StandardFrame
- func (f *StandardFrame) AckData() ([]byte, error)
- func (f *StandardFrame) Data() ([]byte, error)
- func (f *StandardFrame) GetBody() imparse.BizProto
- func (f *StandardFrame) GetCreateTime() uint64
- func (f *StandardFrame) GetFrom() string
- func (f *StandardFrame) GetKey() string
- func (f *StandardFrame) GetMid() int64
- func (f *StandardFrame) GetTarget() string
- func (f *StandardFrame) GetTransmissionMethod() imparse.Channel
- func (f *StandardFrame) PushData() ([]byte, error)
- func (f *StandardFrame) SetBody(body imparse.BizProto)
- func (f *StandardFrame) SetCreateTime(createTime uint64)
- func (f *StandardFrame) SetFrom(from string)
- func (f *StandardFrame) SetKey(key string)
- func (f *StandardFrame) SetMid(mid int64)
- func (f *StandardFrame) SetTarget(target string)
- func (f *StandardFrame) SetTransmissionMethod(transmissionMethod imparse.Channel)
- type StandardParse
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupFrame ¶
type GroupFrame struct {
*StandardFrame
// contains filtered or unexported fields
}
private
func NewGroupFrame ¶
func NewGroupFrame(standardFrame *StandardFrame, bizPro *biz.Common) *GroupFrame
func (*GroupFrame) AckBody ¶
func (p *GroupFrame) AckBody() ([]byte, error)
func (*GroupFrame) GetBase ¶
func (p *GroupFrame) GetBase() *biz.Common
func (*GroupFrame) GetChannelType ¶
func (p *GroupFrame) GetChannelType() biz.Channel
func (*GroupFrame) GetMsgType ¶
func (p *GroupFrame) GetMsgType() biz.MsgType
func (*GroupFrame) PushBody ¶
func (p *GroupFrame) PushBody() ([]byte, error)
func (*GroupFrame) Type ¶
func (p *GroupFrame) Type() imparse.FrameType
type Option ¶
type Option func(*Options)
func WithCreateTime ¶
func WithTarget ¶
func WithTransmissionMethod ¶
type PrivateFrame ¶
type PrivateFrame struct {
*StandardFrame
// contains filtered or unexported fields
}
private
func NewPrivateFrame ¶
func NewPrivateFrame(standardFrame *StandardFrame, bizPro *biz.Common) *PrivateFrame
func (*PrivateFrame) AckBody ¶
func (p *PrivateFrame) AckBody() ([]byte, error)
func (*PrivateFrame) GetBase ¶
func (p *PrivateFrame) GetBase() *biz.Common
func (*PrivateFrame) GetChannelType ¶
func (p *PrivateFrame) GetChannelType() biz.Channel
func (*PrivateFrame) GetMsgType ¶
func (p *PrivateFrame) GetMsgType() biz.MsgType
func (*PrivateFrame) PushBody ¶
func (p *PrivateFrame) PushBody() ([]byte, error)
func (*PrivateFrame) Type ¶
func (p *PrivateFrame) Type() imparse.FrameType
type SignalFrame ¶
type SignalFrame struct {
*StandardFrame
// contains filtered or unexported fields
}
private
func NewNoticeFrame ¶
func NewNoticeFrame(standardFrame *StandardFrame, bizPro *biz.Signal) *SignalFrame
func (*SignalFrame) AckBody ¶
func (p *SignalFrame) AckBody() ([]byte, error)
func (*SignalFrame) GetBase ¶
func (p *SignalFrame) GetBase() *biz.Signal
func (*SignalFrame) PushBody ¶
func (p *SignalFrame) PushBody() ([]byte, error)
func (*SignalFrame) Type ¶
func (p *SignalFrame) Type() imparse.FrameType
type StandardFrame ¶
type StandardFrame struct {
// contains filtered or unexported fields
}
标准帧 定义了标准协议的Ack数据和Push数据格式
func NewStandardFrame ¶
func NewStandardFrame(base *comet.Proto, key, from string, opts ...Option) *StandardFrame
func (*StandardFrame) AckData ¶
func (f *StandardFrame) AckData() ([]byte, error)
func (*StandardFrame) Data ¶
func (f *StandardFrame) Data() ([]byte, error)
func (*StandardFrame) GetBody ¶
func (f *StandardFrame) GetBody() imparse.BizProto
func (*StandardFrame) GetCreateTime ¶
func (f *StandardFrame) GetCreateTime() uint64
func (*StandardFrame) GetFrom ¶
func (f *StandardFrame) GetFrom() string
func (*StandardFrame) GetKey ¶
func (f *StandardFrame) GetKey() string
func (*StandardFrame) GetMid ¶
func (f *StandardFrame) GetMid() int64
func (*StandardFrame) GetTarget ¶
func (f *StandardFrame) GetTarget() string
func (*StandardFrame) GetTransmissionMethod ¶
func (f *StandardFrame) GetTransmissionMethod() imparse.Channel
func (*StandardFrame) PushData ¶
func (f *StandardFrame) PushData() ([]byte, error)
func (*StandardFrame) SetBody ¶
func (f *StandardFrame) SetBody(body imparse.BizProto)
func (*StandardFrame) SetCreateTime ¶
func (f *StandardFrame) SetCreateTime(createTime uint64)
func (*StandardFrame) SetFrom ¶
func (f *StandardFrame) SetFrom(from string)
func (*StandardFrame) SetKey ¶
func (f *StandardFrame) SetKey(key string)
func (*StandardFrame) SetMid ¶
func (f *StandardFrame) SetMid(mid int64)
func (*StandardFrame) SetTarget ¶
func (f *StandardFrame) SetTarget(target string)
func (*StandardFrame) SetTransmissionMethod ¶
func (f *StandardFrame) SetTransmissionMethod(transmissionMethod imparse.Channel)
Click to show internal directories.
Click to hide internal directories.