http

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Overview

Package http implements an HTTP server that simply returns 'ok' for any URL and sends stats on a string channel. This is used by cloudprober to act as the backend for the HTTP based probes.

Index

Constants

This section is empty.

Variables

View Source
var OK = "ok"

OK is the response returned as successful indication by "/", and "/healthcheck".

Functions

This section is empty.

Types

type Server

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

Server implements a basic single-threaded, fast response web server.

func New

func New(initCtx context.Context, c *configpb.ServerConf, l *logger.Logger) (*Server, error)

New returns a Server.

func (*Server) Start

func (s *Server) Start(ctx context.Context, dataChan chan<- *metrics.EventMetrics) error

Start starts a simple HTTP server on a given port. This function returns only if there is an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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