grpc

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package grpc is a generated protocol buffer package.

It is generated from these files:

service_properties.proto

It has these top-level messages:

ServiceProperties

Index

Constants

View Source
const (
	ServiceTypeGRPC = "gRPC"
)

Variables

This section is empty.

Functions

func EncodeServiceProperties

func EncodeServiceProperties(properties ServiceProperties) *types.Struct

Types

type Plugin

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

func NewPlugin

func NewPlugin() *Plugin

func (*Plugin) GetDependencies

func (p *Plugin) GetDependencies(cfg *v1.Config) *plugins.Dependencies

func (*Plugin) HttpFilters

func (*Plugin) Init added in v0.4.2

func (p *Plugin) Init(options bootstrap.Options) error

func (*Plugin) ParseFunctionSpec

func (p *Plugin) ParseFunctionSpec(params *plugins.FunctionPluginParams, in v1.FunctionSpec) (*types.Struct, error)

just so the init plugin knows we're functional

func (*Plugin) ProcessRoute

func (p *Plugin) ProcessRoute(_ *plugins.RoutePluginParams, in *v1.Route, out *envoyroute.Route) error

func (*Plugin) ProcessUpstream

func (p *Plugin) ProcessUpstream(params *plugins.UpstreamPluginParams, in *v1.Upstream, out *envoyapi.Cluster) error

type ServiceProperties

type ServiceProperties struct {
	// the names of the gRPC services defined in the descriptors. The methods on
	// services specified here can be called using JSON/REST via Gloo's function-level routing
	GrpcServiceNames []string `protobuf:"bytes,1,rep,name=grpc_service_names,json=grpcServiceNames" json:"grpc_service_names,omitempty"`
	// The [Gloo File Ref](https://gloo.solo.io/introduction/concepts/#Files) to a File
	// containing the proto descriptors generated for the gRPC service
	// This file will be generated automatically by Gloo Function Discovery if it is enabled
	// and the gRPC service supports Reflection
	DescriptorsFileRef string `protobuf:"bytes,2,opt,name=descriptors_file_ref,json=descriptorsFileRef,proto3" json:"descriptors_file_ref,omitempty"`
}

Service Properties for gRPC Services Service Properties must be set to enable JSON-to-gRPC Transcoding for gRPC Services via Gloo. Note: gRPC detection and configuration can be performed automatically by Gloo for services that support gRPC Reflection. Function Discovery must be enabled.

func DecodeServiceProperties

func DecodeServiceProperties(generic *types.Struct) (ServiceProperties, error)

func (*ServiceProperties) Descriptor

func (*ServiceProperties) Descriptor() ([]byte, []int)

func (*ServiceProperties) Equal

func (this *ServiceProperties) Equal(that interface{}) bool

func (*ServiceProperties) GetDescriptorsFileRef

func (m *ServiceProperties) GetDescriptorsFileRef() string

func (*ServiceProperties) GetGrpcServiceNames

func (m *ServiceProperties) GetGrpcServiceNames() []string

func (*ServiceProperties) ProtoMessage

func (*ServiceProperties) ProtoMessage()

func (*ServiceProperties) Reset

func (m *ServiceProperties) Reset()

func (*ServiceProperties) String

func (m *ServiceProperties) String() string

type ServicesAndDescriptor

type ServicesAndDescriptor struct {
	ServiceNames []string
	PackageNames []string
	Descriptors  *descriptor.FileDescriptorSet
}

Jump to

Keyboard shortcuts

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