writer

package
v0.0.0-...-c1a7e98 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerificationMessage = "VERIFICATION_MESSAGE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer is a log.Writer implementation that writes log messages to Kafka.

func NewWriter

func NewWriter(commonOpts *genericoptions.KafkaOptions,
	verifyOpts *genericoptions.KafkaOptions,
	uplinkOpts *genericoptions.KafkaOptions,
	historyStore store.HistoryStore) (*Writer, error)

NewWriter creates a new kafkaLogger instance.

func (*Writer) WriteMessage

func (l *Writer) WriteMessage(ctx context.Context, msg *types.TemplateMsgRequest, messageType string) error

WriteMessage writes a log message for the common message.

func (*Writer) WriteUplinkMessage

func (l *Writer) WriteUplinkMessage(ctx context.Context, msg *types.UplinkMsgRequest)

WriteUplinkMessage writes a log message for the uplink message.

func (*Writer) WriterHistory

func (l *Writer) WriterHistory(history *model.HistoryM)

WriterHistory adds a new history record in the datastore.

Jump to

Keyboard shortcuts

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