article

package
v0.0.0-...-3c0bad3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	URL         string `json:"url,omitempty"`
	Header      string `json:"header,omitempty"`
	Content     string `json:"content,omitempty"`
	Author      string `json:"author,omitempty"`
	IsSponsored bool   `json:"isSponsored,omitempty"`
}

type ArticleProccessor

type ArticleProccessor interface {
	Process(msg Article) error
}

type Config

type Config struct {
	Addr string
}

type Consumer

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

func NewConsumer

func NewConsumer(log *slog.Logger, processor ArticleProccessor) *Consumer

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Connect

func (c *Consumer) Connect(addr string) error

func (*Consumer) Consume

func (c *Consumer) Consume() error

Jump to

Keyboard shortcuts

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