consumer

package
v1.0.126 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConsumeFromBegin = "begin"
	ConsumeFromEnd   = "end"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	common.LoggerConfig
	common.ClientConfig
	ProjectID                      string
	TopicIDList                    []string
	ConsumerGroupName              string
	ConsumerName                   string
	ConsumeFrom                    string
	HeartbeatIntervalInSecond      int
	DataFetchIntervalInMillisecond int64
	FlushCheckpointIntervalSecond  int
	MaxFetchLogGroupCount          int
	OrderedConsume                 bool
}

func GetDefaultConsumerConfig

func GetDefaultConsumerConfig() *Config

type Consumer

type Consumer interface {
	ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
	Start() error
	Stop()
}

func NewConsumer

func NewConsumer(ctx context.Context, conf *Config, f func(topicID string, shardID int, l *pb.LogGroupList)) (Consumer, error)

Jump to

Keyboard shortcuts

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