lifecycle

package
v0.0.0-...-9677058 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package lifecycle is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPing = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPing   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterPingServiceHandler

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

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

func RegisterPingServiceHandlerClient

func RegisterPingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingServiceClient) error

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

func RegisterPingServiceHandlerFromEndpoint

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

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

func RegisterPingServiceServer

func RegisterPingServiceServer(s *grpc.Server, srv PingServiceServer)

Types

type Ping

type Ping struct {
	Msg                  string   `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedPing

func NewPopulatedPing(r randyPing, easy bool) *Ping

func (*Ping) Descriptor

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

func (*Ping) Equal

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

func (*Ping) GetMsg

func (m *Ping) GetMsg() string

func (*Ping) Marshal

func (m *Ping) Marshal() (dAtA []byte, err error)

func (*Ping) MarshalTo

func (m *Ping) MarshalTo(dAtA []byte) (int, error)

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) Size

func (m *Ping) Size() (n int)

func (*Ping) String

func (m *Ping) String() string

func (*Ping) Unmarshal

func (m *Ping) Unmarshal(dAtA []byte) error

func (*Ping) XXX_DiscardUnknown

func (m *Ping) XXX_DiscardUnknown()

func (*Ping) XXX_Marshal

func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ping) XXX_Merge

func (m *Ping) XXX_Merge(src proto.Message)

func (*Ping) XXX_Size

func (m *Ping) XXX_Size() int

func (*Ping) XXX_Unmarshal

func (m *Ping) XXX_Unmarshal(b []byte) error

type PingServiceClient

type PingServiceClient interface {
	GetPing(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*Ping, error)
}

PingServiceClient is the client API for PingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPingServiceClient

func NewPingServiceClient(cc *grpc.ClientConn) PingServiceClient

type PingServiceServer

type PingServiceServer interface {
	GetPing(context.Context, *Ping) (*Ping, error)
}

PingServiceServer is the server API for PingService service.

Jump to

Keyboard shortcuts

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