healthpb

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package healthpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHealthCheckServiceHandler

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

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

func RegisterHealthCheckServiceHandlerClient

func RegisterHealthCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthCheckServiceClient) error

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

func RegisterHealthCheckServiceHandlerFromEndpoint

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

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

func RegisterHealthCheckServiceServer

func RegisterHealthCheckServiceServer(s *grpc.Server, srv HealthCheckServiceServer)

Types

type HealthCheckServiceClient

type HealthCheckServiceClient interface {
	Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Pong, error)
}

HealthCheckServiceClient is the client API for HealthCheckService service.

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

func NewHealthCheckServiceClient

func NewHealthCheckServiceClient(cc *grpc.ClientConn) HealthCheckServiceClient

type HealthCheckServiceServer

type HealthCheckServiceServer interface {
	Ping(context.Context, *empty.Empty) (*Pong, error)
}

HealthCheckServiceServer is the server API for HealthCheckService service.

type Pong

type Pong struct {
	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Network              string   `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Pong contains basic information about the node

func (*Pong) Descriptor

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

func (*Pong) GetNetwork

func (m *Pong) GetNetwork() string

func (*Pong) GetVersion

func (m *Pong) GetVersion() string

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

func (*Pong) XXX_DiscardUnknown

func (m *Pong) XXX_DiscardUnknown()

func (*Pong) XXX_Marshal

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

func (*Pong) XXX_Merge

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

func (*Pong) XXX_Size

func (m *Pong) XXX_Size() int

func (*Pong) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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