probe

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAndRunGRPCHealthProbe

func CreateAndRunGRPCHealthProbe(ctx context.Context, healthService string, options ...Option)

CreateAndRunGRPCHealthProbe - Creates gRPC Health Probe and starts running it background while registering the probing results to Health Server. TODO: configurable period, timeout

Types

type GrpcHealthProbe

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

func NewGRPCHealthProbe

func NewGRPCHealthProbe(options ...Option) (*GrpcHealthProbe, error)

NewGRPCHealthProbe - Creates gRPC health checking probe

func (*GrpcHealthProbe) Run

func (ghp *GrpcHealthProbe) Run(ctx context.Context) error

Run - Runs gRPC health checking probe Returns nil if status is HealthCheckResponse_SERVING, and err otherwise

func (*GrpcHealthProbe) String

func (ghp *GrpcHealthProbe) String() string

String -

type Option

type Option func(o *probeOptions)

Option is an option pattern for GrpcHealthProbe

func WithAddress

func WithAddress(addr string) Option

WithAddress sets address for grpc health probe

func WithCommand

func WithCommand(cmd string) Option

WithCommand sets grpc health probe command name

func WithConnectTimeout

func WithConnectTimeout(connTimeout string) Option

WithConnectTimeout connect timeout for grpc health probe

func WithRPCTimeout

func WithRPCTimeout(rpcTimeout string) Option

WithRPCTimeout RPC timeout for grpc health probe

func WithService

func WithService(service string) Option

WithService sets service for grpc health probe

func WithSpiffe

func WithSpiffe() Option

WithSpiffe sets spiffe option for grpc health probe

Jump to

Keyboard shortcuts

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