pb

package
v0.0.0-...-42befb5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

api.proto

It has these top-level messages:

SimpleMessage

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSpaceMeshServiceHandler

func RegisterSpaceMeshServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSpaceMeshServiceHandler registers the http handlers for service SpaceMeshService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSpaceMeshServiceHandlerClient

func RegisterSpaceMeshServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SpaceMeshServiceClient) error

RegisterSpaceMeshServiceHandler registers the http handlers for service SpaceMeshService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SpaceMeshServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SpaceMeshServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SpaceMeshServiceClient" to call the correct interceptors.

func RegisterSpaceMeshServiceHandlerFromEndpoint

func RegisterSpaceMeshServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSpaceMeshServiceHandlerFromEndpoint is same as RegisterSpaceMeshServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSpaceMeshServiceServer

func RegisterSpaceMeshServiceServer(s *grpc.Server, srv SpaceMeshServiceServer)

Types

type SimpleMessage

type SimpleMessage struct {
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}

func (*SimpleMessage) Descriptor

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

func (*SimpleMessage) GetValue

func (m *SimpleMessage) GetValue() string

func (*SimpleMessage) ProtoMessage

func (*SimpleMessage) ProtoMessage()

func (*SimpleMessage) Reset

func (m *SimpleMessage) Reset()

func (*SimpleMessage) String

func (m *SimpleMessage) String() string

type SpaceMeshServiceClient

type SpaceMeshServiceClient interface {
	Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
}

func NewSpaceMeshServiceClient

func NewSpaceMeshServiceClient(cc *grpc.ClientConn) SpaceMeshServiceClient

type SpaceMeshServiceServer

type SpaceMeshServiceServer interface {
	Echo(context.Context, *SimpleMessage) (*SimpleMessage, error)
}

Jump to

Keyboard shortcuts

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