healthcheck

package
v0.0.0-...-16dbe3d Latest Latest
Warning

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

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

Documentation

Overview

Package healthcheck is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_healthcheck_proto protoreflect.FileDescriptor

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 RegisterHealthcheckServiceHandlerServer

func RegisterHealthcheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthcheckServiceServer) error

RegisterHealthcheckServiceHandlerServer registers the http handlers for service HealthcheckService to "mux". UnaryRPC :call HealthcheckServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthcheckServiceHandlerFromEndpoint instead.

func RegisterHealthcheckServiceServer

func RegisterHealthcheckServiceServer(s *grpc.Server, srv HealthcheckServiceServer)

Types

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type HealthcheckServiceClient

type HealthcheckServiceClient interface {
	Healthcheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MessageOutput, 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.

type HealthcheckServiceServer

type HealthcheckServiceServer interface {
	Healthcheck(context.Context, *Empty) (*MessageOutput, error)
}

HealthcheckServiceServer is the server API for HealthcheckService service.

type MessageOutput

type MessageOutput struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageOutput) Descriptor deprecated

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

Deprecated: Use MessageOutput.ProtoReflect.Descriptor instead.

func (*MessageOutput) GetMsg

func (x *MessageOutput) GetMsg() string

func (*MessageOutput) ProtoMessage

func (*MessageOutput) ProtoMessage()

func (*MessageOutput) ProtoReflect

func (x *MessageOutput) ProtoReflect() protoreflect.Message

func (*MessageOutput) Reset

func (x *MessageOutput) Reset()

func (*MessageOutput) String

func (x *MessageOutput) String() string

type UnimplementedHealthcheckServiceServer

type UnimplementedHealthcheckServiceServer struct {
}

UnimplementedHealthcheckServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedHealthcheckServiceServer) Healthcheck

Jump to

Keyboard shortcuts

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