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 ¶
func (s *TransformTextService) TransformAndSplitText(stream proto.TransformTextService_TransformAndSplitTextServer) error
TransformAndSplitText splits the text provided in a streamed proto.TransformTextRequest in words, and transform each word by applying the provided transformer.
func (*TransformTextService) TransformText ¶
func (s *TransformTextService) TransformText(ctx context.Context, in *proto.TransformTextRequest) (*proto.TransformTextResponse, error)
TransformText transforms the text provided in a proto.TransformTextRequest by applying the provided transformer.
Click to show internal directories.
Click to hide internal directories.