iotex-core: github.com/iotexproject/iotex-core/pkg/probe Index | Files

package probe

import "github.com/iotexproject/iotex-core/pkg/probe"

Index

Package Files

options.go probe.go

func WithReadinessHandler Uses

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

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

type Option Uses

type Option interface {
    SetOption(*Server)
}

Option is ued to set probe server's options.

type Server Uses

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

Server is a http server for service probe.

func New Uses

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

New creates a new probe server.

func (*Server) NotReady Uses

func (s *Server) NotReady()

NotReady makes the probe server starts returning failure status on readiness and health endpoint.

func (*Server) Ready Uses

func (s *Server) Ready()

Ready makes the probe server starts returning status on readiness and health endpoint.

func (*Server) Start Uses

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

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

func (*Server) Stop Uses

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

Stop shutdown the probe server.

Package probe imports 8 packages (graph) and is imported by 2 packages. Updated 2019-08-11. Refresh now. Tools for package owners.