lib

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package lib contains the library code for protoc-gen-yarpc-go-v2.

It is split into a separate package so it can be called by the testing package.

Index

Constants

This section is empty.

Variables

View Source
var Runner = protoplugin.NewRunner(
	template.Must(template.New("tmpl").Funcs(
		template.FuncMap{
			"unaryMethods":                 unaryMethods,
			"onewayMethods":                onewayMethods,
			"clientStreamingMethods":       clientStreamingMethods,
			"serverStreamingMethods":       serverStreamingMethods,
			"clientServerStreamingMethods": clientServerStreamingMethods,
			"encodedFileDescriptor":        encodedFileDescriptor,
			"fileDescriptorClosureVarName": fileDescriptorClosureVarName,
			"trimPrefixPeriod":             trimPrefixPeriod,
		}).Parse(tmpl)),
	checkTemplateInfo,
	[]string{
		"context",
		"io/ioutil",
		"reflect",
		"go.uber.org/yarpc/encoding/protobuf/v2",
		"google.golang.org/protobuf/proto",
		"go.uber.org/fx",
		"go.uber.org/yarpc",
		"go.uber.org/yarpc/api/transport",
		"go.uber.org/yarpc/api/x/restriction",
		"go.uber.org/yarpc/encoding/protobuf/v2",
		"go.uber.org/yarpc/encoding/protobuf/reflection",
	},
	func(file *protoplugin.File) (string, error) {
		name := file.GetName()
		return fmt.Sprintf("%s.pb.yarpc.go", strings.TrimSuffix(name, filepath.Ext(name))), nil
	},
	func(key string, value string) error {
		return nil
	},
)

Runner is the Runner used for protoc-gen-yarpc-go-v2.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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