health

package
v3.3.15 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 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 NewHandler added in v3.3.7

func NewHandler(opts ...Option) *handler

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 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 {
	LiveChecks  []CheckFunc
	ReadyChecks []CheckFunc
	Version     string
	Name        string
}

Jump to

Keyboard shortcuts

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