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 ¶
- Variables
- func NewService(opts ...Option) rpc.API
- func RegisterHealthCheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHealthCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthCheckServiceClient) error
- func RegisterHealthCheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHealthCheckServiceServer(s *grpc.Server, srv HealthCheckServiceServer)
- func SetLivenessAndReadiness(mux *http.ServeMux, checkFns ...CheckFn)
- type CheckFn
- type EmptyRequest
- func (*EmptyRequest) Descriptor() ([]byte, []int)
- func (m *EmptyRequest) Marshal() (dAtA []byte, err error)
- func (m *EmptyRequest) MarshalTo(dAtA []byte) (int, error)
- func (*EmptyRequest) ProtoMessage()
- func (m *EmptyRequest) Reset()
- func (m *EmptyRequest) Size() (n int)
- func (m *EmptyRequest) String() string
- func (m *EmptyRequest) Unmarshal(dAtA []byte) error
- type EmptyResponse
- func (*EmptyResponse) Descriptor() ([]byte, []int)
- func (m *EmptyResponse) Marshal() (dAtA []byte, err error)
- func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error)
- func (*EmptyResponse) ProtoMessage()
- func (m *EmptyResponse) Reset()
- func (m *EmptyResponse) Size() (n int)
- func (m *EmptyResponse) String() string
- func (m *EmptyResponse) Unmarshal(dAtA []byte) error
- type HealthCheckServiceClient
- type HealthCheckServiceServer
- type Option
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHealth = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHealth = fmt.Errorf("proto: integer overflow") )
Functions ¶
func NewService ¶ added in v1.0.5
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
SetLivenessAndReadiness sets the liveness and readiness route in http server mux
Types ¶
type CheckFn ¶
func GRPCServerHealthChecker ¶
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) 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) 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) }