Documentation ¶
Index ¶
- func CalcPayloadFrameSize(data, metadata []byte) int
- func FromBytes(b []byte) (core.Frame, error)
- func FromRawFrame(f *RawFrame) (frame core.Frame, err error)
- func NewWriteableRequestResponseFrame(id uint32, data, metadata []byte, fg core.FrameFlag) core.WriteableFrame
- func NewWriteableRequestStreamFrame(id uint32, n uint32, data, metadata []byte, flag core.FrameFlag) core.WriteableFrame
- func PrintFrame(f core.WriteableFrame) string
- type CancelFrame
- type ErrorFrame
- func (t ErrorFrame) Done() (closed bool)
- func (t ErrorFrame) DoneNotify() <-chan struct{}
- func (p *ErrorFrame) Error() string
- func (p *ErrorFrame) ErrorCode() core.ErrorCode
- func (p *ErrorFrame) ErrorData() []byte
- func (t ErrorFrame) Header() core.FrameHeader
- func (p *ErrorFrame) Validate() (err error)
- type FireAndForgetFrame
- func (f *FireAndForgetFrame) Data() []byte
- func (f *FireAndForgetFrame) DataUTF8() string
- func (t FireAndForgetFrame) Done() (closed bool)
- func (t FireAndForgetFrame) DoneNotify() <-chan struct{}
- func (t FireAndForgetFrame) Header() core.FrameHeader
- func (f *FireAndForgetFrame) Metadata() ([]byte, bool)
- func (f *FireAndForgetFrame) MetadataUTF8() (metadata string, ok bool)
- func (f *FireAndForgetFrame) Validate() (err error)
- type KeepaliveFrame
- type LeaseFrame
- func (t LeaseFrame) Done() (closed bool)
- func (t LeaseFrame) DoneNotify() <-chan struct{}
- func (t LeaseFrame) Header() core.FrameHeader
- func (l *LeaseFrame) Metadata() []byte
- func (l *LeaseFrame) NumberOfRequests() uint32
- func (l *LeaseFrame) TimeToLive() time.Duration
- func (l *LeaseFrame) Validate() (err error)
- type MetadataPushFrame
- func (m *MetadataPushFrame) Data() []byte
- func (m *MetadataPushFrame) DataUTF8() (data string)
- func (t MetadataPushFrame) Done() (closed bool)
- func (t MetadataPushFrame) DoneNotify() <-chan struct{}
- func (t MetadataPushFrame) Header() core.FrameHeader
- func (m *MetadataPushFrame) Metadata() ([]byte, bool)
- func (m *MetadataPushFrame) MetadataUTF8() (metadata string, ok bool)
- func (m *MetadataPushFrame) Validate() (err error)
- type PayloadFrame
- func (p *PayloadFrame) Data() []byte
- func (p *PayloadFrame) DataUTF8() string
- func (t PayloadFrame) Done() (closed bool)
- func (t PayloadFrame) DoneNotify() <-chan struct{}
- func (t PayloadFrame) Header() core.FrameHeader
- func (p *PayloadFrame) Metadata() ([]byte, bool)
- func (p *PayloadFrame) MetadataUTF8() (metadata string, ok bool)
- func (p *PayloadFrame) Validate() (err error)
- type RawFrame
- type RequestChannelFrame
- func (r *RequestChannelFrame) Data() []byte
- func (r *RequestChannelFrame) DataUTF8() string
- func (t RequestChannelFrame) Done() (closed bool)
- func (t RequestChannelFrame) DoneNotify() <-chan struct{}
- func (t RequestChannelFrame) Header() core.FrameHeader
- func (r *RequestChannelFrame) InitialRequestN() uint32
- func (r *RequestChannelFrame) Metadata() ([]byte, bool)
- func (r *RequestChannelFrame) MetadataUTF8() (metadata string, ok bool)
- func (r *RequestChannelFrame) Validate() error
- type RequestNFrame
- type RequestResponseFrame
- func (r *RequestResponseFrame) Data() []byte
- func (r *RequestResponseFrame) DataUTF8() string
- func (t RequestResponseFrame) Done() (closed bool)
- func (t RequestResponseFrame) DoneNotify() <-chan struct{}
- func (t RequestResponseFrame) Header() core.FrameHeader
- func (r *RequestResponseFrame) Metadata() ([]byte, bool)
- func (r *RequestResponseFrame) MetadataUTF8() (metadata string, ok bool)
- func (r *RequestResponseFrame) Validate() (err error)
- type RequestStreamFrame
- func (r *RequestStreamFrame) Data() []byte
- func (r *RequestStreamFrame) DataUTF8() string
- func (t RequestStreamFrame) Done() (closed bool)
- func (t RequestStreamFrame) DoneNotify() <-chan struct{}
- func (t RequestStreamFrame) Header() core.FrameHeader
- func (r *RequestStreamFrame) InitialRequestN() uint32
- func (r *RequestStreamFrame) Metadata() ([]byte, bool)
- func (r *RequestStreamFrame) MetadataUTF8() (metadata string, ok bool)
- func (r *RequestStreamFrame) Validate() error
- type ResumeFrame
- func (t ResumeFrame) Done() (closed bool)
- func (t ResumeFrame) DoneNotify() <-chan struct{}
- func (r *ResumeFrame) FirstAvailableClientPosition() uint64
- func (t ResumeFrame) Header() core.FrameHeader
- func (r *ResumeFrame) LastReceivedServerPosition() uint64
- func (r *ResumeFrame) Token() []byte
- func (r *ResumeFrame) Validate() (err error)
- func (r *ResumeFrame) Version() core.Version
- type ResumeOKFrame
- type SetupFrame
- func (p *SetupFrame) Data() []byte
- func (p *SetupFrame) DataMimeType() (mime string)
- func (p *SetupFrame) DataUTF8() string
- func (t SetupFrame) Done() (closed bool)
- func (t SetupFrame) DoneNotify() <-chan struct{}
- func (t SetupFrame) Header() core.FrameHeader
- func (p *SetupFrame) MaxLifetime() time.Duration
- func (p *SetupFrame) Metadata() ([]byte, bool)
- func (p *SetupFrame) MetadataMimeType() string
- func (p *SetupFrame) MetadataUTF8() (metadata string, ok bool)
- func (p *SetupFrame) TimeBetweenKeepalive() time.Duration
- func (p *SetupFrame) Token() []byte
- func (p *SetupFrame) Validate() (err error)
- func (p *SetupFrame) Version() core.Version
- type WriteableCancelFrame
- type WriteableErrorFrame
- func (t WriteableErrorFrame) Done() (closed bool)
- func (t WriteableErrorFrame) DoneNotify() <-chan struct{}
- func (e WriteableErrorFrame) Error() string
- func (t WriteableErrorFrame) Header() core.FrameHeader
- func (e WriteableErrorFrame) Len() int
- func (e WriteableErrorFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableFireAndForgetFrame
- func (t WriteableFireAndForgetFrame) Done() (closed bool)
- func (t WriteableFireAndForgetFrame) DoneNotify() <-chan struct{}
- func (t WriteableFireAndForgetFrame) Header() core.FrameHeader
- func (f WriteableFireAndForgetFrame) Len() int
- func (f WriteableFireAndForgetFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableKeepaliveFrame
- type WriteableLeaseFrame
- type WriteableMetadataPushFrame
- func (t WriteableMetadataPushFrame) Done() (closed bool)
- func (t WriteableMetadataPushFrame) DoneNotify() <-chan struct{}
- func (t WriteableMetadataPushFrame) Header() core.FrameHeader
- func (m WriteableMetadataPushFrame) Len() int
- func (m WriteableMetadataPushFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteablePayloadFrame
- func (p WriteablePayloadFrame) Data() []byte
- func (p WriteablePayloadFrame) DataUTF8() (data string)
- func (t WriteablePayloadFrame) Done() (closed bool)
- func (t WriteablePayloadFrame) DoneNotify() <-chan struct{}
- func (t WriteablePayloadFrame) Header() core.FrameHeader
- func (p WriteablePayloadFrame) Len() int
- func (p WriteablePayloadFrame) Metadata() (metadata []byte, ok bool)
- func (p WriteablePayloadFrame) MetadataUTF8() (metadata string, ok bool)
- func (p WriteablePayloadFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableRequestChannelFrame
- func (t WriteableRequestChannelFrame) Done() (closed bool)
- func (t WriteableRequestChannelFrame) DoneNotify() <-chan struct{}
- func (t WriteableRequestChannelFrame) Header() core.FrameHeader
- func (r WriteableRequestChannelFrame) Len() int
- func (r WriteableRequestChannelFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableRequestNFrame
- type WriteableRequestResponseFrame
- func (t WriteableRequestResponseFrame) Done() (closed bool)
- func (t WriteableRequestResponseFrame) DoneNotify() <-chan struct{}
- func (t WriteableRequestResponseFrame) Header() core.FrameHeader
- func (r WriteableRequestResponseFrame) Len() int
- func (r WriteableRequestResponseFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableRequestStreamFrame
- func (t WriteableRequestStreamFrame) Done() (closed bool)
- func (t WriteableRequestStreamFrame) DoneNotify() <-chan struct{}
- func (t WriteableRequestStreamFrame) Header() core.FrameHeader
- func (r WriteableRequestStreamFrame) Len() int
- func (r WriteableRequestStreamFrame) WriteTo(w io.Writer) (n int64, err error)
- type WriteableResumeFrame
- type WriteableResumeOKFrame
- type WriteableSetupFrame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcPayloadFrameSize ¶
CalcPayloadFrameSize returns payload frame size.
func FromRawFrame ¶
FromRawFrame creates a frame from a RawFrame.
func NewWriteableRequestResponseFrame ¶
func NewWriteableRequestResponseFrame(id uint32, data, metadata []byte, fg core.FrameFlag) core.WriteableFrame
NewWriteableRequestResponseFrame returns a new WriteableRequestResponseFrame.
func NewWriteableRequestStreamFrame ¶
func NewWriteableRequestStreamFrame(id uint32, n uint32, data, metadata []byte, flag core.FrameFlag) core.WriteableFrame
NewWriteableRequestStreamFrame creates a new WriteableRequestStreamFrame.
func PrintFrame ¶
func PrintFrame(f core.WriteableFrame) string
PrintFrame prints frame in bytes dump.
Types ¶
type CancelFrame ¶
type CancelFrame struct {
*RawFrame
}
CancelFrame is frame of Cancel.
func NewCancelFrame ¶
func NewCancelFrame(sid uint32) *CancelFrame
NewCancelFrame creates cancel frame.
func (CancelFrame) Done ¶
func (t CancelFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (CancelFrame) DoneNotify ¶
func (t CancelFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (CancelFrame) Header ¶
func (t CancelFrame) Header() core.FrameHeader
func (*CancelFrame) Validate ¶
func (f *CancelFrame) Validate() (err error)
Validate returns error if frame is invalid.
type ErrorFrame ¶
type ErrorFrame struct {
*RawFrame
}
ErrorFrame is error frame.
func NewErrorFrame ¶
func NewErrorFrame(streamID uint32, code core.ErrorCode, data []byte) *ErrorFrame
NewErrorFrame returns a new error frame.
func (ErrorFrame) Done ¶
func (t ErrorFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (ErrorFrame) DoneNotify ¶
func (t ErrorFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (*ErrorFrame) ErrorCode ¶
func (p *ErrorFrame) ErrorCode() core.ErrorCode
ErrorCode returns error code.
func (*ErrorFrame) ErrorData ¶
func (p *ErrorFrame) ErrorData() []byte
ErrorData returns error data bytes.
func (ErrorFrame) Header ¶
func (t ErrorFrame) Header() core.FrameHeader
func (*ErrorFrame) Validate ¶
func (p *ErrorFrame) Validate() (err error)
Validate returns error if frame is invalid.
type FireAndForgetFrame ¶
type FireAndForgetFrame struct {
*RawFrame
}
FireAndForgetFrame is FireAndForget frame.
func NewFireAndForgetFrame ¶
func NewFireAndForgetFrame(sid uint32, data, metadata []byte, flag core.FrameFlag) *FireAndForgetFrame
NewFireAndForgetFrame returns a new FireAndForgetFrame.
func (*FireAndForgetFrame) Data ¶
func (f *FireAndForgetFrame) Data() []byte
Data returns data bytes.
func (*FireAndForgetFrame) DataUTF8 ¶
func (f *FireAndForgetFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (FireAndForgetFrame) Done ¶
func (t FireAndForgetFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (FireAndForgetFrame) DoneNotify ¶
func (t FireAndForgetFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (FireAndForgetFrame) Header ¶
func (t FireAndForgetFrame) Header() core.FrameHeader
func (*FireAndForgetFrame) Metadata ¶
func (f *FireAndForgetFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*FireAndForgetFrame) MetadataUTF8 ¶
func (f *FireAndForgetFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*FireAndForgetFrame) Validate ¶
func (f *FireAndForgetFrame) Validate() (err error)
Validate returns error if frame is invalid.
type KeepaliveFrame ¶
type KeepaliveFrame struct {
*RawFrame
}
KeepaliveFrame is Keepalive frame.
func NewKeepaliveFrame ¶
func NewKeepaliveFrame(position uint64, data []byte, respond bool) *KeepaliveFrame
NewKeepaliveFrame creates a new KeepaliveFrame.
func (KeepaliveFrame) Done ¶
func (t KeepaliveFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (KeepaliveFrame) DoneNotify ¶
func (t KeepaliveFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (KeepaliveFrame) Header ¶
func (t KeepaliveFrame) Header() core.FrameHeader
func (*KeepaliveFrame) LastReceivedPosition ¶
func (k *KeepaliveFrame) LastReceivedPosition() uint64
LastReceivedPosition returns last received position.
func (*KeepaliveFrame) Validate ¶
func (k *KeepaliveFrame) Validate() (err error)
Validate returns error if frame is invalid.
type LeaseFrame ¶
type LeaseFrame struct {
*RawFrame
}
LeaseFrame is Lease frame.
func NewLeaseFrame ¶
func NewLeaseFrame(ttl time.Duration, n uint32, metadata []byte) *LeaseFrame
NewLeaseFrame creates a new LeaseFrame.
func (LeaseFrame) Done ¶
func (t LeaseFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (LeaseFrame) DoneNotify ¶
func (t LeaseFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (LeaseFrame) Header ¶
func (t LeaseFrame) Header() core.FrameHeader
func (*LeaseFrame) Metadata ¶
func (l *LeaseFrame) Metadata() []byte
Metadata returns metadata bytes.
func (*LeaseFrame) NumberOfRequests ¶
func (l *LeaseFrame) NumberOfRequests() uint32
NumberOfRequests returns number of requests.
func (*LeaseFrame) TimeToLive ¶
func (l *LeaseFrame) TimeToLive() time.Duration
TimeToLive returns time to live duration.
func (*LeaseFrame) Validate ¶
func (l *LeaseFrame) Validate() (err error)
Validate returns error if frame is invalid.
type MetadataPushFrame ¶
type MetadataPushFrame struct {
*RawFrame
}
MetadataPushFrame is MetadataPush frame.
func NewMetadataPushFrame ¶
func NewMetadataPushFrame(metadata []byte) *MetadataPushFrame
NewMetadataPushFrame returns a new MetadataPushFrame.
func (*MetadataPushFrame) DataUTF8 ¶
func (m *MetadataPushFrame) DataUTF8() (data string)
DataUTF8 returns data as UTF8 string.
func (MetadataPushFrame) Done ¶
func (t MetadataPushFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (MetadataPushFrame) DoneNotify ¶
func (t MetadataPushFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (MetadataPushFrame) Header ¶
func (t MetadataPushFrame) Header() core.FrameHeader
func (*MetadataPushFrame) Metadata ¶
func (m *MetadataPushFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*MetadataPushFrame) MetadataUTF8 ¶
func (m *MetadataPushFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*MetadataPushFrame) Validate ¶
func (m *MetadataPushFrame) Validate() (err error)
Validate returns error if frame is invalid.
type PayloadFrame ¶
type PayloadFrame struct {
*RawFrame
}
PayloadFrame is payload frame.
func NewPayloadFrame ¶
func NewPayloadFrame(id uint32, data, metadata []byte, flag core.FrameFlag) *PayloadFrame
NewPayloadFrame returns a new PayloadFrame.
func (*PayloadFrame) DataUTF8 ¶
func (p *PayloadFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (PayloadFrame) Done ¶
func (t PayloadFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (PayloadFrame) DoneNotify ¶
func (t PayloadFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (PayloadFrame) Header ¶
func (t PayloadFrame) Header() core.FrameHeader
func (*PayloadFrame) Metadata ¶
func (p *PayloadFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*PayloadFrame) MetadataUTF8 ¶
func (p *PayloadFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*PayloadFrame) Validate ¶
func (p *PayloadFrame) Validate() (err error)
Validate returns error if frame is invalid.
type RawFrame ¶
type RawFrame struct {
// contains filtered or unexported fields
}
RawFrame is basic frame implementation.
func NewRawFrame ¶
func NewRawFrame(header core.FrameHeader, body *common.ByteBuff) *RawFrame
NewRawFrame returns a new RawFrame.
func (RawFrame) Done ¶
func (t RawFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (RawFrame) DoneNotify ¶
func (t RawFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (RawFrame) Header ¶
func (t RawFrame) Header() core.FrameHeader
type RequestChannelFrame ¶
type RequestChannelFrame struct {
*RawFrame
}
RequestChannelFrame is RequestChannel frame.
func NewRequestChannelFrame ¶
func NewRequestChannelFrame(sid uint32, n uint32, data, metadata []byte, flag core.FrameFlag) *RequestChannelFrame
NewRequestChannelFrame creates a new RequestChannelFrame.
func (*RequestChannelFrame) Data ¶
func (r *RequestChannelFrame) Data() []byte
Data returns data bytes.
func (*RequestChannelFrame) DataUTF8 ¶
func (r *RequestChannelFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (RequestChannelFrame) Done ¶
func (t RequestChannelFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (RequestChannelFrame) DoneNotify ¶
func (t RequestChannelFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (RequestChannelFrame) Header ¶
func (t RequestChannelFrame) Header() core.FrameHeader
func (*RequestChannelFrame) InitialRequestN ¶
func (r *RequestChannelFrame) InitialRequestN() uint32
InitialRequestN returns initial N.
func (*RequestChannelFrame) Metadata ¶
func (r *RequestChannelFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*RequestChannelFrame) MetadataUTF8 ¶
func (r *RequestChannelFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*RequestChannelFrame) Validate ¶
func (r *RequestChannelFrame) Validate() error
Validate returns error if frame is invalid.
type RequestNFrame ¶
type RequestNFrame struct {
*RawFrame
}
RequestNFrame is RequestN frame.
func NewRequestNFrame ¶
func NewRequestNFrame(sid, n uint32, fg core.FrameFlag) *RequestNFrame
NewRequestNFrame creates a new RequestNFrame.
func (RequestNFrame) Done ¶
func (t RequestNFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (RequestNFrame) DoneNotify ¶
func (t RequestNFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (RequestNFrame) Header ¶
func (t RequestNFrame) Header() core.FrameHeader
func (*RequestNFrame) Validate ¶
func (r *RequestNFrame) Validate() (err error)
Validate returns error if frame is invalid.
type RequestResponseFrame ¶
type RequestResponseFrame struct {
*RawFrame
}
RequestResponseFrame is RequestResponse frame.
func NewRequestResponseFrame ¶
func NewRequestResponseFrame(id uint32, data, metadata []byte, fg core.FrameFlag) *RequestResponseFrame
NewRequestResponseFrame returns a new RequestResponseFrame.
func (*RequestResponseFrame) Data ¶
func (r *RequestResponseFrame) Data() []byte
Data returns data bytes.
func (*RequestResponseFrame) DataUTF8 ¶
func (r *RequestResponseFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (RequestResponseFrame) Done ¶
func (t RequestResponseFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (RequestResponseFrame) DoneNotify ¶
func (t RequestResponseFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (RequestResponseFrame) Header ¶
func (t RequestResponseFrame) Header() core.FrameHeader
func (*RequestResponseFrame) Metadata ¶
func (r *RequestResponseFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*RequestResponseFrame) MetadataUTF8 ¶
func (r *RequestResponseFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*RequestResponseFrame) Validate ¶
func (r *RequestResponseFrame) Validate() (err error)
Validate returns error if frame is invalid.
type RequestStreamFrame ¶
type RequestStreamFrame struct {
*RawFrame
}
RequestStreamFrame is RequestStream frame.
func NewRequestStreamFrame ¶
func NewRequestStreamFrame(id uint32, n uint32, data, metadata []byte, flag core.FrameFlag) *RequestStreamFrame
NewRequestStreamFrame returns a new RequestStreamFrame.
func (*RequestStreamFrame) Data ¶
func (r *RequestStreamFrame) Data() []byte
Data returns data bytes.
func (*RequestStreamFrame) DataUTF8 ¶
func (r *RequestStreamFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (RequestStreamFrame) Done ¶
func (t RequestStreamFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (RequestStreamFrame) DoneNotify ¶
func (t RequestStreamFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (RequestStreamFrame) Header ¶
func (t RequestStreamFrame) Header() core.FrameHeader
func (*RequestStreamFrame) InitialRequestN ¶
func (r *RequestStreamFrame) InitialRequestN() uint32
InitialRequestN returns initial request N.
func (*RequestStreamFrame) Metadata ¶
func (r *RequestStreamFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*RequestStreamFrame) MetadataUTF8 ¶
func (r *RequestStreamFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
func (*RequestStreamFrame) Validate ¶
func (r *RequestStreamFrame) Validate() error
Validate returns error if frame is invalid.
type ResumeFrame ¶
type ResumeFrame struct {
*RawFrame
}
ResumeFrame is Resume frame.
func NewResumeFrame ¶
func NewResumeFrame(version core.Version, token []byte, firstAvailableClientPosition, lastReceivedServerPosition uint64) *ResumeFrame
NewResumeFrame creates a new ResumeFrame.
func (ResumeFrame) Done ¶
func (t ResumeFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (ResumeFrame) DoneNotify ¶
func (t ResumeFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (*ResumeFrame) FirstAvailableClientPosition ¶
func (r *ResumeFrame) FirstAvailableClientPosition() uint64
FirstAvailableClientPosition returns first available client position.
func (ResumeFrame) Header ¶
func (t ResumeFrame) Header() core.FrameHeader
func (*ResumeFrame) LastReceivedServerPosition ¶
func (r *ResumeFrame) LastReceivedServerPosition() uint64
LastReceivedServerPosition returns last received server position.
func (*ResumeFrame) Token ¶
func (r *ResumeFrame) Token() []byte
Token returns resume token in bytes.
func (*ResumeFrame) Validate ¶
func (r *ResumeFrame) Validate() (err error)
Validate validate current frame.
type ResumeOKFrame ¶
type ResumeOKFrame struct {
*RawFrame
}
ResumeOKFrame is ResumeOK frame.
func NewResumeOKFrame ¶
func NewResumeOKFrame(position uint64) *ResumeOKFrame
NewResumeOKFrame creates a new ResumeOKFrame.
func (ResumeOKFrame) Done ¶
func (t ResumeOKFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (ResumeOKFrame) DoneNotify ¶
func (t ResumeOKFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (ResumeOKFrame) Header ¶
func (t ResumeOKFrame) Header() core.FrameHeader
func (*ResumeOKFrame) LastReceivedClientPosition ¶
func (r *ResumeOKFrame) LastReceivedClientPosition() uint64
LastReceivedClientPosition returns last received client position.
func (*ResumeOKFrame) Validate ¶
func (r *ResumeOKFrame) Validate() (err error)
Validate validate current frame.
type SetupFrame ¶
type SetupFrame struct {
*RawFrame
}
SetupFrame is Setup frame.
func NewSetupFrame ¶
func NewSetupFrame( version core.Version, timeBetweenKeepalive, maxLifetime time.Duration, token []byte, mimeMetadata []byte, mimeData []byte, data []byte, metadata []byte, lease bool, ) *SetupFrame
NewSetupFrame returns a new SetupFrame.
func (*SetupFrame) DataMimeType ¶
func (p *SetupFrame) DataMimeType() (mime string)
DataMimeType returns MIME of data.
func (*SetupFrame) DataUTF8 ¶
func (p *SetupFrame) DataUTF8() string
DataUTF8 returns data as UTF8 string.
func (SetupFrame) Done ¶
func (t SetupFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (SetupFrame) DoneNotify ¶
func (t SetupFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (SetupFrame) Header ¶
func (t SetupFrame) Header() core.FrameHeader
func (*SetupFrame) MaxLifetime ¶
func (p *SetupFrame) MaxLifetime() time.Duration
MaxLifetime returns keepalive max lifetime.
func (*SetupFrame) Metadata ¶
func (p *SetupFrame) Metadata() ([]byte, bool)
Metadata returns metadata bytes.
func (*SetupFrame) MetadataMimeType ¶
func (p *SetupFrame) MetadataMimeType() string
MetadataMimeType returns MIME of metadata.
func (*SetupFrame) MetadataUTF8 ¶
func (p *SetupFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string
func (*SetupFrame) TimeBetweenKeepalive ¶
func (p *SetupFrame) TimeBetweenKeepalive() time.Duration
TimeBetweenKeepalive returns keepalive interval duration.
func (*SetupFrame) Validate ¶
func (p *SetupFrame) Validate() (err error)
Validate returns error if frame is invalid.
type WriteableCancelFrame ¶
type WriteableCancelFrame struct {
// contains filtered or unexported fields
}
WriteableCancelFrame is writeable frame of Cancel.
func NewWriteableCancelFrame ¶
func NewWriteableCancelFrame(id uint32) *WriteableCancelFrame
NewWriteableCancelFrame creates a new WriteableCancelFrame.
func (WriteableCancelFrame) Done ¶
func (t WriteableCancelFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableCancelFrame) DoneNotify ¶
func (t WriteableCancelFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableCancelFrame) Header ¶
func (t WriteableCancelFrame) Header() core.FrameHeader
func (WriteableCancelFrame) Len ¶
func (c WriteableCancelFrame) Len() int
Len returns length of frame.
type WriteableErrorFrame ¶
type WriteableErrorFrame struct {
// contains filtered or unexported fields
}
WriteableErrorFrame is writeable error frame.
func NewWriteableErrorFrame ¶
func NewWriteableErrorFrame(id uint32, code core.ErrorCode, data []byte) *WriteableErrorFrame
NewWriteableErrorFrame creates WriteableErrorFrame.
func (WriteableErrorFrame) Done ¶
func (t WriteableErrorFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableErrorFrame) DoneNotify ¶
func (t WriteableErrorFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableErrorFrame) Error ¶
func (e WriteableErrorFrame) Error() string
Error returns error string.
func (WriteableErrorFrame) Header ¶
func (t WriteableErrorFrame) Header() core.FrameHeader
func (WriteableErrorFrame) Len ¶
func (e WriteableErrorFrame) Len() int
Len returns length of frame.
type WriteableFireAndForgetFrame ¶
type WriteableFireAndForgetFrame struct {
// contains filtered or unexported fields
}
WriteableFireAndForgetFrame is writeable FireAndForget frame.
func NewWriteableFireAndForgetFrame ¶
func NewWriteableFireAndForgetFrame(sid uint32, data, metadata []byte, flag core.FrameFlag) *WriteableFireAndForgetFrame
NewWriteableFireAndForgetFrame creates a new WriteableFireAndForgetFrame.
func (WriteableFireAndForgetFrame) Done ¶
func (t WriteableFireAndForgetFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableFireAndForgetFrame) DoneNotify ¶
func (t WriteableFireAndForgetFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableFireAndForgetFrame) Header ¶
func (t WriteableFireAndForgetFrame) Header() core.FrameHeader
func (WriteableFireAndForgetFrame) Len ¶
func (f WriteableFireAndForgetFrame) Len() int
Len returns length of frame.
type WriteableKeepaliveFrame ¶
type WriteableKeepaliveFrame struct {
// contains filtered or unexported fields
}
WriteableKeepaliveFrame is writeable Keepalive frame.
func NewWriteableKeepaliveFrame ¶
func NewWriteableKeepaliveFrame(position uint64, data []byte, respond bool) *WriteableKeepaliveFrame
NewWriteableKeepaliveFrame creates a new WriteableKeepaliveFrame.
func (WriteableKeepaliveFrame) Done ¶
func (t WriteableKeepaliveFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableKeepaliveFrame) DoneNotify ¶
func (t WriteableKeepaliveFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableKeepaliveFrame) Header ¶
func (t WriteableKeepaliveFrame) Header() core.FrameHeader
func (WriteableKeepaliveFrame) Len ¶
func (k WriteableKeepaliveFrame) Len() int
Len returns length of frame.
type WriteableLeaseFrame ¶
type WriteableLeaseFrame struct {
// contains filtered or unexported fields
}
WriteableLeaseFrame is writeable Lease frame.
func NewWriteableLeaseFrame ¶
func NewWriteableLeaseFrame(ttl time.Duration, n uint32, metadata []byte) *WriteableLeaseFrame
NewWriteableLeaseFrame creates a new WriteableLeaseFrame.
func (WriteableLeaseFrame) Done ¶
func (t WriteableLeaseFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableLeaseFrame) DoneNotify ¶
func (t WriteableLeaseFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableLeaseFrame) Header ¶
func (t WriteableLeaseFrame) Header() core.FrameHeader
func (WriteableLeaseFrame) Len ¶
func (l WriteableLeaseFrame) Len() int
Len returns length of frame.
type WriteableMetadataPushFrame ¶
type WriteableMetadataPushFrame struct {
// contains filtered or unexported fields
}
WriteableMetadataPushFrame is writeable MetadataPush frame.
func NewWriteableMetadataPushFrame ¶
func NewWriteableMetadataPushFrame(metadata []byte) *WriteableMetadataPushFrame
NewWriteableMetadataPushFrame creates a new WriteableMetadataPushFrame.
func (WriteableMetadataPushFrame) Done ¶
func (t WriteableMetadataPushFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableMetadataPushFrame) DoneNotify ¶
func (t WriteableMetadataPushFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableMetadataPushFrame) Header ¶
func (t WriteableMetadataPushFrame) Header() core.FrameHeader
func (WriteableMetadataPushFrame) Len ¶
func (m WriteableMetadataPushFrame) Len() int
Len returns length of frame.
type WriteablePayloadFrame ¶
type WriteablePayloadFrame struct {
// contains filtered or unexported fields
}
WriteablePayloadFrame is writeable Payload frame.
func NewWriteablePayloadFrame ¶
func NewWriteablePayloadFrame(id uint32, data, metadata []byte, flag core.FrameFlag) *WriteablePayloadFrame
NewWriteablePayloadFrame returns a new WriteablePayloadFrame.
func (WriteablePayloadFrame) Data ¶
func (p WriteablePayloadFrame) Data() []byte
Data returns data bytes.
func (WriteablePayloadFrame) DataUTF8 ¶
func (p WriteablePayloadFrame) DataUTF8() (data string)
DataUTF8 returns data as UTF8 string.
func (WriteablePayloadFrame) Done ¶
func (t WriteablePayloadFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteablePayloadFrame) DoneNotify ¶
func (t WriteablePayloadFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteablePayloadFrame) Header ¶
func (t WriteablePayloadFrame) Header() core.FrameHeader
func (WriteablePayloadFrame) Len ¶
func (p WriteablePayloadFrame) Len() int
Len returns length of frame.
func (WriteablePayloadFrame) Metadata ¶
func (p WriteablePayloadFrame) Metadata() (metadata []byte, ok bool)
Metadata returns metadata bytes.
func (WriteablePayloadFrame) MetadataUTF8 ¶
func (p WriteablePayloadFrame) MetadataUTF8() (metadata string, ok bool)
MetadataUTF8 returns metadata as UTF8 string.
type WriteableRequestChannelFrame ¶
type WriteableRequestChannelFrame struct {
// contains filtered or unexported fields
}
WriteableRequestChannelFrame is writeable RequestChannel frame.
func NewWriteableRequestChannelFrame ¶
func NewWriteableRequestChannelFrame(sid uint32, n uint32, data, metadata []byte, flag core.FrameFlag) *WriteableRequestChannelFrame
NewWriteableRequestChannelFrame creates a new WriteableRequestChannelFrame.
func (WriteableRequestChannelFrame) Done ¶
func (t WriteableRequestChannelFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableRequestChannelFrame) DoneNotify ¶
func (t WriteableRequestChannelFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableRequestChannelFrame) Header ¶
func (t WriteableRequestChannelFrame) Header() core.FrameHeader
func (WriteableRequestChannelFrame) Len ¶
func (r WriteableRequestChannelFrame) Len() int
Len returns length of frame.
type WriteableRequestNFrame ¶
type WriteableRequestNFrame struct {
// contains filtered or unexported fields
}
WriteableRequestNFrame is writeable RequestN frame.
func NewWriteableRequestNFrame ¶
func NewWriteableRequestNFrame(id uint32, n uint32, fg core.FrameFlag) *WriteableRequestNFrame
NewWriteableRequestNFrame creates a new WriteableRequestNFrame.
func (WriteableRequestNFrame) Done ¶
func (t WriteableRequestNFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableRequestNFrame) DoneNotify ¶
func (t WriteableRequestNFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableRequestNFrame) Header ¶
func (t WriteableRequestNFrame) Header() core.FrameHeader
func (WriteableRequestNFrame) Len ¶
func (r WriteableRequestNFrame) Len() int
Len returns length of frame.
type WriteableRequestResponseFrame ¶
type WriteableRequestResponseFrame struct {
// contains filtered or unexported fields
}
WriteableRequestResponseFrame is writeable RequestResponse frame.
func (WriteableRequestResponseFrame) Done ¶
func (t WriteableRequestResponseFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableRequestResponseFrame) DoneNotify ¶
func (t WriteableRequestResponseFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableRequestResponseFrame) Header ¶
func (t WriteableRequestResponseFrame) Header() core.FrameHeader
func (WriteableRequestResponseFrame) Len ¶
func (r WriteableRequestResponseFrame) Len() int
Len returns length of frame.
type WriteableRequestStreamFrame ¶
type WriteableRequestStreamFrame struct {
// contains filtered or unexported fields
}
WriteableRequestStreamFrame is writeable RequestStream frame.
func (WriteableRequestStreamFrame) Done ¶
func (t WriteableRequestStreamFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableRequestStreamFrame) DoneNotify ¶
func (t WriteableRequestStreamFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableRequestStreamFrame) Header ¶
func (t WriteableRequestStreamFrame) Header() core.FrameHeader
func (WriteableRequestStreamFrame) Len ¶
func (r WriteableRequestStreamFrame) Len() int
Len returns length of frame.
type WriteableResumeFrame ¶
type WriteableResumeFrame struct {
// contains filtered or unexported fields
}
WriteableResumeFrame is writeable Resume frame.
func NewWriteableResumeFrame ¶
func NewWriteableResumeFrame(version core.Version, token []byte, firstAvailableClientPosition, lastReceivedServerPosition uint64) *WriteableResumeFrame
NewWriteableResumeFrame creates a new WriteableResumeFrame.
func (WriteableResumeFrame) Done ¶
func (t WriteableResumeFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableResumeFrame) DoneNotify ¶
func (t WriteableResumeFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableResumeFrame) Header ¶
func (t WriteableResumeFrame) Header() core.FrameHeader
func (WriteableResumeFrame) Len ¶
func (r WriteableResumeFrame) Len() int
Len returns length of frame.
type WriteableResumeOKFrame ¶
type WriteableResumeOKFrame struct {
// contains filtered or unexported fields
}
WriteableResumeOKFrame is writeable ResumeOK frame.
func NewWriteableResumeOKFrame ¶
func NewWriteableResumeOKFrame(position uint64) *WriteableResumeOKFrame
NewWriteableResumeOKFrame creates a new WriteableResumeOKFrame.
func (WriteableResumeOKFrame) Done ¶
func (t WriteableResumeOKFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableResumeOKFrame) DoneNotify ¶
func (t WriteableResumeOKFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableResumeOKFrame) Header ¶
func (t WriteableResumeOKFrame) Header() core.FrameHeader
func (WriteableResumeOKFrame) Len ¶
func (r WriteableResumeOKFrame) Len() int
Len returns length of frame.
type WriteableSetupFrame ¶
type WriteableSetupFrame struct {
// contains filtered or unexported fields
}
WriteableSetupFrame is writeable Setup frame.
func NewWriteableSetupFrame ¶
func NewWriteableSetupFrame( version core.Version, timeBetweenKeepalive, maxLifetime time.Duration, token []byte, mimeMetadata []byte, mimeData []byte, data []byte, metadata []byte, lease bool, ) *WriteableSetupFrame
NewWriteableSetupFrame creates a new WriteableSetupFrame.
func (WriteableSetupFrame) Done ¶
func (t WriteableSetupFrame) Done() (closed bool)
Done can be invoked when a frame has been been processed.
func (WriteableSetupFrame) DoneNotify ¶
func (t WriteableSetupFrame) DoneNotify() <-chan struct{}
DoneNotify notify when frame has been done.
func (WriteableSetupFrame) Header ¶
func (t WriteableSetupFrame) Header() core.FrameHeader
func (WriteableSetupFrame) Len ¶
func (s WriteableSetupFrame) Len() int
Len returns length of frame.