Versions in this module Expand all Collapse all v4 v4.14.1 Apr 26, 2023 Changes in this version + var ErrBadMessageBytes = errors.New("serialised message bytes were in unexpected format") + var ErrMessagePartNotExist = errors.New("target message part does not exist") + func CopyJSON(root any) any + func DeserializeBytes(b []byte) ([][]byte, error) + func GetAllBytes(m Batch) [][]byte + func GetContext(p *Part) context.Context + func NewSortGroup(m Batch) (*SortGroup, Batch) + func NewSortGroupParts(parts []*Part) (*SortGroup, []*Part) + func SerializeBytes(parts [][]byte) []byte + type Batch []*Part + func FromBytes(b []byte) (Batch, error) + func QuickBatch(bslice [][]byte) Batch + func (m Batch) DeepCopy() Batch + func (m Batch) Get(index int) *Part + func (m Batch) Iter(f func(i int, p *Part) error) error + func (m Batch) Len() int + func (m Batch) ShallowCopy() Batch + type Part struct + func NewPart(data []byte) *Part + func WithContext(ctx context.Context, p *Part) *Part + func (p *Part) AsBytes() []byte + func (p *Part) AsStructured() (any, error) + func (p *Part) AsStructuredMut() (any, error) + func (p *Part) DeepCopy() *Part + func (p *Part) ErrorGet() error + func (p *Part) ErrorSet(err error) + func (p *Part) GetContext() context.Context + func (p *Part) IsEmpty() bool + func (p *Part) MetaDelete(key string) + func (p *Part) MetaGetMut(key string) (any, bool) + func (p *Part) MetaGetStr(key string) string + func (p *Part) MetaIterMut(f func(string, any) error) error + func (p *Part) MetaIterStr(f func(string, string) error) error + func (p *Part) MetaSetMut(key string, value any) + func (p *Part) SetBytes(data []byte) *Part + func (p *Part) SetStructured(jObj any) + func (p *Part) SetStructuredMut(jObj any) + func (p *Part) ShallowCopy() *Part + func (p *Part) WithContext(ctx context.Context) *Part + type SortGroup struct + Len int + func TopLevelSortGroup(p *Part) *SortGroup + func (g *SortGroup) GetIndex(p *Part) int + type Transaction struct + Payload Batch + func NewTransaction(payload Batch, resChan chan<- error) Transaction + func NewTransactionFunc(payload Batch, fn func(context.Context, error) error) Transaction + func (t *Transaction) Ack(ctx context.Context, err error) error + func (t *Transaction) Context() context.Context + func (t *Transaction) WithContext(ctx context.Context) *Transaction Other modules containing this package github.com/dafanshu/benthos/v3