meta

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileSpecLabels

func CompileSpecLabels(resource models.JobSpec) (labels []models.JobMetadataLabelItem)

Types

type EventPublish added in v0.0.3

type EventPublish struct {
	SpecCount int
}

EventPublish represents a specification being published to meta event stream

func (*EventPublish) String added in v0.0.3

func (e *EventPublish) String() string

type JobAdapter

type JobAdapter struct {
}

func (JobAdapter) CompileKey

func (a JobAdapter) CompileKey(urn string) ([]byte, error)

func (JobAdapter) CompileMessage

func (a JobAdapter) CompileMessage(jobMetadata *models.JobMetadata) ([]byte, error)

func (JobAdapter) FromJobSpec

func (a JobAdapter) FromJobSpec(namespaceSpec models.NamespaceSpec, jobSpec models.JobSpec) (*models.JobMetadata, error)

type KafkaWriter

type KafkaWriter interface {
	WriteMessages(context.Context, ...kafka.Message) error
	Close() error
	Stats() kafka.WriterStats
}

KafkaWriter is an abstraction over kafka-go client implementation

type MetaSvcFactory

type MetaSvcFactory interface {
	New() models.MetadataService
}

type Service

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

func NewService

func NewService(writer models.MetadataWriter, builder models.JobMetadataAdapter) *Service

func (Service) Publish

func (service Service) Publish(namespaceSpec models.NamespaceSpec, jobSpecs []models.JobSpec, po progress.Observer) error

type Writer

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

Writer will be used to write send data to kafka topic

func NewWriter

func NewWriter(w KafkaWriter, buffSize int) *Writer

NewWriter returns a instance for writer used over kafka client

func (*Writer) Flush

func (w *Writer) Flush() error

Flush will push all the queued up messages to kafka

func (*Writer) Write

func (w *Writer) Write(protobufkey []byte, protobuf []byte) error

Write push messages to kafka this will throw an error if connection was closed in the middle of write

Jump to

Keyboard shortcuts

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