instructions

package
v0.3.36 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HasNodeName added in v0.3.30

type HasNodeName interface {
	GetNodeName() string
}

type Service added in v0.3.36

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

func New added in v0.3.36

func New(m *metrics.Metrics) *Service

func (*Service) Convert added in v0.3.36

func (s *Service) Convert(
	ctx context.Context,
	msgs chan *pulsarutils.ConsumerMessage,
	bufferSize int,
	userAnnotationPrefix string,
	compressor compress.Compressor,
) chan *model.InstructionSet

Convert takes a channel containing incoming pulsar messages and returns a channel with the corresponding InstructionSets. Each pulsar message will generate exactly one InstructionSet.

func (*Service) ConvertMsg added in v0.3.36

func (s *Service) ConvertMsg(
	ctx context.Context,
	msg *pulsarutils.ConsumerMessage,
	userAnnotationPrefix string,
	compressor compress.Compressor,
) *model.InstructionSet

ConvertMsg converts a pulsar message into an InstructionSet. An instructionSet will always be produced even if errors are encountered via parsing. In this case of errors, the resulting InstructionSet will contain all events that could be parsed, along with the mesageId of the original message. In the case that no events can be parsed (e.g. the message is not valid protobuf), an empty InstructionSet containing only the messageId will be returned.

Jump to

Keyboard shortcuts

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