consumer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr string
}

type Consumer

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

func New

func New(config *Config) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Consume

func (c *Consumer) Consume(ctx context.Context, topic string) <-chan Payload

type Payload

type Payload struct {
	Message []byte
	// contains filtered or unexported fields
}

func (Payload) Err

func (p Payload) Err() error

func (Payload) JsonUnmarshal

func (p Payload) JsonUnmarshal(v interface{}) error

func (Payload) ProtoUnmarshal

func (p Payload) ProtoUnmarshal(m proto.Message) error

Jump to

Keyboard shortcuts

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