httpservice

package
v0.0.0-...-45ee728 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package httpservice contains the milo regular HTTP handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(c *router.Context, err error)

ErrorHandler renders an error page for the user.

Types

type HTTPService

type HTTPService struct {
	Server *server.Server

	// GetSettings returns the current setting for milo.
	GetSettings func(c context.Context) (*configpb.Settings, error)

	// GetResultDBClient returns a ResultDB client for the given context.
	GetResultDBClient func(c context.Context, host string, as auth.RPCAuthorityKind) (rdbpb.ResultDBClient, error)
}

HTTPService is the Milo frontend service that serves multiple regular HTTP endpoints. TODO(weiweilin): move other HTTP endpoints to HTTPService.

func (*HTTPService) RegisterRoutes

func (s *HTTPService) RegisterRoutes()

RegisterRoutes registers routes explicitly handled by the handler.

Jump to

Keyboard shortcuts

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