health

package
v3.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-micro source: health.proto

Code generated by protoc-gen-micro source: health.proto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHealthEndpoints

func NewHealthEndpoints() []*api.Endpoint

func RegisterHealthServer

func RegisterHealthServer(s server.Server, sh HealthServer, opts ...server.HandlerOption) error

Types

type CheckFunc

type CheckFunc func(context.Context) error

type Handler added in v3.3.17

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

func NewHandler added in v3.3.7

func NewHandler(opts ...Option) *Handler

func (*Handler) Live added in v3.3.17

func (h *Handler) Live(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error

func (*Handler) Ready added in v3.3.17

func (h *Handler) Ready(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error

func (*Handler) Version added in v3.3.17

func (h *Handler) Version(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error

type HealthServer

type HealthServer interface {
	Live(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
	Ready(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
	Version(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
}

type Option

type Option func(*Options)

func LiveChecks

func LiveChecks(fns ...CheckFunc) Option

func Name

func Name(name string) Option

func ReadyChecks

func ReadyChecks(fns ...CheckFunc) Option

func Version

func Version(version string) Option

type Options

type Options struct {
	Version     string
	Name        string
	LiveChecks  []CheckFunc
	ReadyChecks []CheckFunc
}

Jump to

Keyboard shortcuts

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