msg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package msg defined transaction message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

Message represents transaction message

func (*Message) Begin

func (m *Message) Begin()

Begin begin message

func (*Message) End

func (m *Message) End()

End end message

func (*Message) Free

func (m *Message) Free()

Free returns bytes to the pool

func (*Message) Put

func (m *Message) Put(bs []byte)

Put put bytes

func (*Message) PutB64EncodedBytes

func (m *Message) PutB64EncodedBytes(key string, bytes []byte)

PutB64EncodedBytes puts ky and bas64 encoded values

func (*Message) PutBool

func (m *Message) PutBool(key string, value bool)

PutBool put key and bool value

func (*Message) PutByte

func (m *Message) PutByte(b byte)

PutByte put bytes

func (*Message) PutFloat

func (m *Message) PutFloat(key string, value float64)

PutFloat put key and float value

func (*Message) PutInt

func (m *Message) PutInt(key string, value int)

PutInt put key and int value

func (*Message) PutInts

func (m *Message) PutInts(key string, values []int)

PutInts puts key and int slice

func (*Message) PutNonEmptyString

func (m *Message) PutNonEmptyString(key, value string)

PutNonEmptyString put key and non empty value

func (*Message) PutObject

func (m *Message) PutObject(key string, object io.Encoder)

PutObject put encoded object

func (*Message) PutObjects

func (m *Message) PutObjects(key string, objects []io.Encoder)

PutObjects put objects

func (*Message) PutString

func (m *Message) PutString(key, value string)

PutString put key and string value

func (*Message) PutStrings

func (m *Message) PutStrings(key string, values []string)

PutStrings put key and string slice

func (*Message) PutUInts

func (m *Message) PutUInts(key string, values []uint64)

PutUInts put key and uint slice

func (*Message) WriteTo

func (m *Message) WriteTo(w iow.Writer) (int64, error)

WriteTo writes message to the writer

type Provider

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

Provider represents a message provider

func NewProvider

func NewProvider(messageSize, concurrency int) *Provider

NewProvider creates a message provider with supplied buffer size and pool size

func (*Provider) NewMessage

func (p *Provider) NewMessage() *Message

NewMessage creates a message

Jump to

Keyboard shortcuts

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