consumerstore

package
v0.0.0-...-783eb67 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: BSD-2-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLogConsumeProgress

type AppLogConsumeProgress struct {
	ConsumerId string `json:"consumer_id"`
	Offset     string `json:"offset"`
}

type ConsumerEntry

type ConsumerEntry struct {
	ID     string
	Offset string `gorm:"type:varchar(100); not null"`
}

type InMemoryConsumerApiProvider

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

func NewInMemoryConsumerApiProvider

func NewInMemoryConsumerApiProvider() *InMemoryConsumerApiProvider

func (*InMemoryConsumerApiProvider) Cleanup

func (consumer *InMemoryConsumerApiProvider) Cleanup()

func (*InMemoryConsumerApiProvider) GetLogConsume

func (consumer *InMemoryConsumerApiProvider) GetLogConsume(ctx context.Context, consumerID string) (*AppLogConsumeProgress, error)

func (*InMemoryConsumerApiProvider) List

func (*InMemoryConsumerApiProvider) LogConsume

func (consumer *InMemoryConsumerApiProvider) LogConsume(ctx context.Context, request *AppLogConsumeProgress) error

type SQLConsumerApiProvider

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

func (*SQLConsumerApiProvider) GetLogConsume

func (consumer *SQLConsumerApiProvider) GetLogConsume(ctx context.Context, consumerID string) (*AppLogConsumeProgress, error)

func (*SQLConsumerApiProvider) List

func (*SQLConsumerApiProvider) LogConsume

func (consumer *SQLConsumerApiProvider) LogConsume(ctx context.Context, request *AppLogConsumeProgress) error

type Store

type Store interface {
	LogConsume(ctx context.Context, request *AppLogConsumeProgress) error
	GetLogConsume(ctx context.Context, consumerID string) (*AppLogConsumeProgress, error)
	List(ctx context.Context) ([]*AppLogConsumeProgress, error)
}

func NewSQLConsumerApiProvider

func NewSQLConsumerApiProvider(dbURI string) (Store, error)

Jump to

Keyboard shortcuts

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