service

package
v0.0.0-...-246a067 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TransformerCounter = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Name: "transformer_total",
		Help: "Total of TransformTextService transformer usage",
	},
	[]string{
		"transformer",
	},
)

TransformerCounter is a metrics collector that counts each transformer usage.

Functions

This section is empty.

Types

type TransformTextService

type TransformTextService struct {
	proto.UnimplementedTransformTextServiceServer
	// contains filtered or unexported fields
}

TransformTextService is the gRPC server service for TransformTextService.

func NewTransformTextService

func NewTransformTextService(cfg *config.Config) *TransformTextService

NewTransformTextService returns a new TransformTextService instance.

func (*TransformTextService) TransformAndSplitText

TransformAndSplitText splits the text provided in a streamed proto.TransformTextRequest in words, and transform each word by applying the provided transformer.

func (*TransformTextService) TransformText

TransformText transforms the text provided in a proto.TransformTextRequest by applying the provided transformer.

Jump to

Keyboard shortcuts

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