creator

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

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

func New

func New() *Creator

func (*Creator) NewMessage added in v1.1.0

func (c *Creator) NewMessage() Message

type Message

type Message struct {
	Sequence    uint64
	ID          string
	CreatedTime time.Time
	Data        []byte
}

Message format for kafka message

func FromBytes

func FromBytes(data []byte) (Message, error)

FromBytes DeSerializes the bytes data to a message via gob decoder

func (Message) Bytes

func (m Message) Bytes() ([]byte, error)

Bytes Serializes the message via gob encoder

func (Message) String

func (m Message) String() string

Jump to

Keyboard shortcuts

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