consumer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheConstomerIdPrefix = "hik_cloud_customer_id_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeData

type ConsumeData struct {
	ConsumerId string `c:"consumerId" json:"consumer_id"`            //消费者ID
	AutoCommit bool   `c:"autoCommit, omitempty" json:"auto_commit"` //是否自动提交偏移量,默认false
}

type Consumer

type Consumer struct {
	Http *http.Http
}

func NewConsumer

func NewConsumer(http *http.Http) *Consumer

func (*Consumer) Consume

func (c *Consumer) Consume(data *ConsumeData) ([]byte, error)

func (*Consumer) Create

func (c *Consumer) Create() ([]byte, error)

func (*Consumer) Messages

func (c *Consumer) Messages() ([]byte, error)

Jump to

Keyboard shortcuts

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