server

package
v0.0.0-...-d45a67e Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package server is a generated protocol buffer package.

It is generated from these files:

protos/server/server.proto

It has these top-level messages:

MyMessage

Package server is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMyServerHandler

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

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

func RegisterMyServerHandlerFromEndpoint

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

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

func RegisterMyServerServer

func RegisterMyServerServer(s *grpc.Server, srv MyServerServer)

Types

type MyMessage

type MyMessage struct {
	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
	Num uint32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"`
}

func (*MyMessage) Descriptor

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

func (*MyMessage) GetMsg

func (m *MyMessage) GetMsg() string

func (*MyMessage) GetNum

func (m *MyMessage) GetNum() uint32

func (*MyMessage) ProtoMessage

func (*MyMessage) ProtoMessage()

func (*MyMessage) Reset

func (m *MyMessage) Reset()

func (*MyMessage) String

func (m *MyMessage) String() string

type MyServerClient

type MyServerClient interface {
	Simple(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*MyMessage, error)
	Unary(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (MyServer_UnaryClient, error)
	Bidi(ctx context.Context, opts ...grpc.CallOption) (MyServer_BidiClient, error)
}

func NewMyServerClient

func NewMyServerClient(cc *grpc.ClientConn) MyServerClient

type MyServer_BidiClient

type MyServer_BidiClient interface {
	Send(*MyMessage) error
	Recv() (*MyMessage, error)
	grpc.ClientStream
}

type MyServer_BidiServer

type MyServer_BidiServer interface {
	Send(*MyMessage) error
	Recv() (*MyMessage, error)
	grpc.ServerStream
}

type MyServer_UnaryClient

type MyServer_UnaryClient interface {
	Recv() (*MyMessage, error)
	grpc.ClientStream
}

type MyServer_UnaryServer

type MyServer_UnaryServer interface {
	Send(*MyMessage) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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