echoserver

package
v0.0.0-...-c72e7a6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package echoserver is a generated protocol buffer package.

It is generated from these files:

echoserver.proto

It has these top-level messages:

EchoRequest
EchoResponse
Heartbeat
Empty

Package echoserver is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Heartbeat_Status_name = map[int32]string{
	0: "UNKNOWN",
	1: "OK",
}
View Source
var Heartbeat_Status_value = map[string]int32{
	"UNKNOWN": 0,
	"OK":      1,
}

Functions

func RegisterEchoServiceHandler

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

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

func RegisterEchoServiceHandlerFromEndpoint

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

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

func RegisterEchoServiceServer

func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)

Types

type EchoRequest

type EchoRequest struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*EchoRequest) Descriptor

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

func (*EchoRequest) GetMessage

func (m *EchoRequest) GetMessage() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) Reset

func (m *EchoRequest) Reset()

func (*EchoRequest) String

func (m *EchoRequest) String() string

type EchoResponse

type EchoResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*EchoResponse) Descriptor

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

func (*EchoResponse) GetMessage

func (m *EchoResponse) GetMessage() string

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) Reset

func (m *EchoResponse) Reset()

func (*EchoResponse) String

func (m *EchoResponse) String() string

type EchoServiceClient

type EchoServiceClient interface {
	Echo(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoClient, error)
	Stream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (EchoService_StreamClient, error)
	Heartbeats(ctx context.Context, opts ...grpc.CallOption) (EchoService_HeartbeatsClient, error)
}

func NewEchoServiceClient

func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient

type EchoServiceServer

type EchoServiceServer interface {
	Echo(EchoService_EchoServer) error
	Stream(*Empty, EchoService_StreamServer) error
	Heartbeats(EchoService_HeartbeatsServer) error
}

type EchoService_EchoClient

type EchoService_EchoClient interface {
	Send(*EchoRequest) error
	Recv() (*EchoResponse, error)
	grpc.ClientStream
}

type EchoService_EchoServer

type EchoService_EchoServer interface {
	Send(*EchoResponse) error
	Recv() (*EchoRequest, error)
	grpc.ServerStream
}

type EchoService_HeartbeatsClient

type EchoService_HeartbeatsClient interface {
	Send(*Empty) error
	Recv() (*Heartbeat, error)
	grpc.ClientStream
}

type EchoService_HeartbeatsServer

type EchoService_HeartbeatsServer interface {
	Send(*Heartbeat) error
	Recv() (*Empty, error)
	grpc.ServerStream
}

type EchoService_StreamClient

type EchoService_StreamClient interface {
	Recv() (*EchoResponse, error)
	grpc.ClientStream
}

type EchoService_StreamServer

type EchoService_StreamServer interface {
	Send(*EchoResponse) error
	grpc.ServerStream
}

type Empty

type Empty struct {
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type Heartbeat

type Heartbeat struct {
	Status Heartbeat_Status `protobuf:"varint,1,opt,name=status,enum=echoserver.Heartbeat_Status" json:"status,omitempty"`
}

func (*Heartbeat) Descriptor

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

func (*Heartbeat) GetStatus

func (m *Heartbeat) GetStatus() Heartbeat_Status

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) Reset

func (m *Heartbeat) Reset()

func (*Heartbeat) String

func (m *Heartbeat) String() string

type Heartbeat_Status

type Heartbeat_Status int32
const (
	Heartbeat_UNKNOWN Heartbeat_Status = 0
	Heartbeat_OK      Heartbeat_Status = 1
)

func (Heartbeat_Status) EnumDescriptor

func (Heartbeat_Status) EnumDescriptor() ([]byte, []int)

func (Heartbeat_Status) String

func (x Heartbeat_Status) String() string

Jump to

Keyboard shortcuts

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