health

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package health is a generated protocol buffer package.

It is generated from these files:
	github.com/getamis/sirius/health/health.proto

It has these top-level messages:
	EmptyRequest
	EmptyResponse

Package health is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

Functions

func NewService added in v1.0.5

func NewService(opts ...Option) rpc.API

NewService creates a new health checking service

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

RegisterHealthCheckServiceHandler 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)

func SetLivenessAndReadiness added in v1.0.10

func SetLivenessAndReadiness(mux *http.ServeMux, checkFns ...CheckFn)

SetLivenessAndReadiness sets the liveness and readiness route in http server mux

Types

type CheckFn

type CheckFn func(context.Context) error

func GRPCServerHealthChecker

func GRPCServerHealthChecker(addr, serviceName string) CheckFn

type EmptyRequest

type EmptyRequest struct {
}

func (*EmptyRequest) Descriptor

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

func (*EmptyRequest) Marshal

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

func (*EmptyRequest) MarshalTo

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

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) Reset

func (m *EmptyRequest) Reset()

func (*EmptyRequest) Size

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

func (*EmptyRequest) String

func (m *EmptyRequest) String() string

func (*EmptyRequest) Unmarshal

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

type EmptyResponse

type EmptyResponse struct {
}

func (*EmptyResponse) Descriptor

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

func (*EmptyResponse) Marshal

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

func (*EmptyResponse) MarshalTo

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

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) Size

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

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) Unmarshal

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

type HealthCheckServiceClient

type HealthCheckServiceClient interface {
	// Health API
	Liveness(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	Readiness(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
}

func NewHealthCheckServiceClient

func NewHealthCheckServiceClient(cc *grpc.ClientConn) HealthCheckServiceClient

type HealthCheckServiceServer

type HealthCheckServiceServer interface {
	// Health API
	Liveness(context.Context, *EmptyRequest) (*EmptyResponse, error)
	Readiness(context.Context, *EmptyRequest) (*EmptyResponse, error)
}

type Option added in v1.0.5

type Option func(server *server)

func Check added in v1.0.5

func Check(fns ...CheckFn) Option

Check retruns an option to add check functions

Jump to

Keyboard shortcuts

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