hosts

package
v0.0.0-...-8ff35f7 Latest Latest
Warning

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

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

Documentation

Overview

Package hosts defines a LUCI Server module used to configure the hostnames of the services MILO communicates with in a deplpoyment.

Index

Constants

This section is empty.

Variables

View Source
var ModuleName = module.RegisterName("go.chromium.org/luci/milo/internal/hosts")

ModuleName can be used to refer to this module when declaring dependencies.

Functions

func APIHost

func APIHost(ctx context.Context) (string, error)

APIHost returns the hostname of the MILO pRPC client. E.g. "milo.api.luci.app".

func NewModule

func NewModule(opts *ModuleOptions) module.Module

NewModule returns a server module that adds authentication settings to the context.

func NewModuleFromFlags

func NewModuleFromFlags() module.Module

NewModuleFromFlags is a variant of NewModule that initializes options through command line flags.

Calling this function registers flags in flag.CommandLine. They are usually parsed in server.Main(...).

func UseHosts

func UseHosts(ctx context.Context, config ModuleOptions) context.Context

UseHosts installs the configures hosts into the context.

Types

type ModuleOptions

type ModuleOptions struct {
	// The hostname to use for pRPC requests to LUCI MILO (e.g. from UI).
	APIHost string
}

ModuleOptions contain configuration of the Hosts server module.

func (*ModuleOptions) Register

func (o *ModuleOptions) Register(f *flag.FlagSet)

Register registers the command line flags.

Jump to

Keyboard shortcuts

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