transformer

package
v1.0.10-0...-7349ede Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsupportedRecordTypeError = constError("Record does not support")
)

Variables

View Source
var (
	FromTransformerDataQueue = prometheus.NewGauge(prometheus.GaugeOpts{
		Name: "gbe_transformer_data_queue",
		Help: "The number of jetdrops in transformer export data queue",
	})
	TransformedPulses = prometheus.NewCounter(prometheus.CounterOpts{
		Name: "gbe_transformer_pulses",
		Help: "The number of transformed pulses",
	})
	TransformedRecords = prometheus.NewCounter(prometheus.CounterOpts{
		Name: "gbe_transformer_records",
		Help: "The number of transformed records",
	})
	Errors = prometheus.NewCounter(prometheus.CounterOpts{
		Name: "gbe_transformer_errors",
		Help: "The number of errors received during data transforming",
	})
)

Functions

func Transform

func Transform(ctx context.Context, jd *types.PlatformPulseData) ([]*types.JetDrop, error)

Transform transforms thr row JetDrops to canonical JetDrops

Types

type MainNetTransformer

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

func NewMainNetTransformer

func NewMainNetTransformer(ch <-chan *types.PlatformPulseData, queueLen uint32) *MainNetTransformer

func (*MainNetTransformer) GetJetDropsChannel

func (m *MainNetTransformer) GetJetDropsChannel() <-chan *types.JetDrop

func (*MainNetTransformer) Start

func (m *MainNetTransformer) Start(ctx context.Context) error

func (*MainNetTransformer) Stop

func (m *MainNetTransformer) Stop(ctx context.Context) error

type Metrics

type Metrics struct{}

func (Metrics) Metrics

func (s Metrics) Metrics(p *metrics.Prometheus) []prometheus.Collector

func (Metrics) Refresh

func (s Metrics) Refresh()

Jump to

Keyboard shortcuts

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