infrainfoserver

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInfoServerListenAddress = ":8080"
	DefaultInfoServerChecksTimeout = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildParams

type BuildParams struct {
	AppName    string `json:"application"`
	AppVersion string `json:"version"`
	GitRev     string `json:"git_revision"`
	BuildDate  string `json:"build_date"`
}

type Config

type Config struct {
	// Address the server will be bound to
	Listen string `mapstructure:"listen"`

	// Timeout for health check call
	ChecksTimeout time.Duration `mapstructure:"checks_timeout"`
}

Config is an info server configuration structure

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Validate

func (c *Config) Validate() error

type Info

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

func NewInfo

func NewInfo(
	cfg *Config,
	op *infraoperator.Operator,
	bp BuildParams,
) *Info

func (*Info) Check

func (s *Info) Check(_ context.Context) error

func (*Info) HealthzHandler

func (s *Info) HealthzHandler() http.Handler

func (*Info) ReadyzHandler

func (s *Info) ReadyzHandler() http.Handler

func (*Info) ReleaseHandler

func (s *Info) ReleaseHandler() http.Handler

func (*Info) Start

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

Start starts listening info http server

func (*Info) Stop

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

Jump to

Keyboard shortcuts

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