probe

package
v2.5.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithReadinessHandler

func WithReadinessHandler(h http.Handler) interface{ Option }

WithReadinessHandler is an option to set a readiness handler for probe server.

Types

type Option

type Option interface {
	SetOption(*Server)
}

Option is ued to set probe server's options.

type Server

type Server struct {
	lifecycle.Readiness
	// contains filtered or unexported fields
}

Server is a http server for service probe.

func New

func New(port int, opts ...Option) *Server

New creates a new probe server.

func (*Server) ReceiveBlock added in v2.3.0

func (s *Server) ReceiveBlock(blk *block.Block) error

ReceiveBlock receives the new block and update the readiness status

func (*Server) Start

func (s *Server) Start(_ context.Context) error

Start starts the probe server and starts returning success status on liveness endpoint.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop shutdown the probe server.

Jump to

Keyboard shortcuts

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