health

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Host         string        `env:"HOST, default=0.0.0.0"`
	Port         string        `env:"PORT, default=8080"`
	ReadTimeout  time.Duration `env:"READ_TIMEOUT, default=60s"`
	WriteTimeout time.Duration `env:"WRITE_TIMEOUT, default=60s"`
}

func (*Options) Addr

func (o *Options) Addr() string

type Server

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

func (*Server) Healthy

func (s *Server) Healthy() bool

func (*Server) Serve

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

func (*Server) SetHealthy

func (s *Server) SetHealthy(healthy bool)

Jump to

Keyboard shortcuts

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