Documentation ¶
Index ¶
- func ByteSlicesToStrings(bss [][]byte) []string
- type ByteBuffer
- func (b *ByteBuffer) Append(data []byte)
- func (b *ByteBuffer) Get(length int, consume bool) (data []byte, ok bool)
- func (b *ByteBuffer) GetByte(consume bool) (byte, bool)
- func (b *ByteBuffer) GetString(length int, consume bool) (string, bool)
- func (b *ByteBuffer) GetSubBuffer(length int, consume bool) (sub *ByteBuffer, ok bool)
- func (b *ByteBuffer) GetUint16(littleEndian, consume bool) (uint16, bool)
- func (b *ByteBuffer) GetUint32(littleEndian, consume bool) (uint32, bool)
- func (b *ByteBuffer) GetUntil(sep []byte, includeSep, consume bool) (data []byte, ok bool)
- func (b *ByteBuffer) Index(sep []byte) int
- func (b *ByteBuffer) Len() int
- func (b *ByteBuffer) Reset()
- func (b *ByteBuffer) Skip(length int) bool
- type LSMAction
- type LinearStateMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteSlicesToStrings ¶
Types ¶
type ByteBuffer ¶
type ByteBuffer struct {
Buf []byte
}
func (*ByteBuffer) Append ¶
func (b *ByteBuffer) Append(data []byte)
func (*ByteBuffer) GetString ¶
func (b *ByteBuffer) GetString(length int, consume bool) (string, bool)
func (*ByteBuffer) GetSubBuffer ¶
func (b *ByteBuffer) GetSubBuffer(length int, consume bool) (sub *ByteBuffer, ok bool)
func (*ByteBuffer) GetUint16 ¶
func (b *ByteBuffer) GetUint16(littleEndian, consume bool) (uint16, bool)
func (*ByteBuffer) GetUint32 ¶
func (b *ByteBuffer) GetUint32(littleEndian, consume bool) (uint32, bool)
func (*ByteBuffer) GetUntil ¶
func (b *ByteBuffer) GetUntil(sep []byte, includeSep, consume bool) (data []byte, ok bool)
func (*ByteBuffer) Index ¶
func (b *ByteBuffer) Index(sep []byte) int
func (*ByteBuffer) Len ¶
func (b *ByteBuffer) Len() int
func (*ByteBuffer) Reset ¶
func (b *ByteBuffer) Reset()
func (*ByteBuffer) Skip ¶
func (b *ByteBuffer) Skip(length int) bool
type LinearStateMachine ¶
type LinearStateMachine struct { Steps []func() LSMAction // contains filtered or unexported fields }
func NewLinearStateMachine ¶
func NewLinearStateMachine(steps ...func() LSMAction) *LinearStateMachine
func (*LinearStateMachine) AppendSteps ¶ added in v0.0.4
func (lsm *LinearStateMachine) AppendSteps(steps ...func() LSMAction)
func (*LinearStateMachine) Reset ¶
func (lsm *LinearStateMachine) Reset()
func (*LinearStateMachine) Run ¶
func (lsm *LinearStateMachine) Run() (cancelled bool, done bool)
Run runs the state machine until it pauses, finishes or is cancelled.
Click to show internal directories.
Click to hide internal directories.