remote

package
v0.0.0-...-2816374 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 11

Documentation

Overview

Package remote implements backends for config client which will make calls to the real Config Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDialOptions

func DefaultDialOptions() []grpc.DialOption

DefaultDialOptions returns default grpc dial options.

func New

func New(ctx context.Context, opts Options) (config.Interface, error)

New returns an implementation of the config Interface which talks to the real LUCI config service.

Types

type ClientFactory

type ClientFactory func(context.Context) (*http.Client, error)

ClientFactory returns HTTP client to use (given a context).

See 'New' for more details.

type Options

type Options struct {
	// Host is the hostname of a LUCI Config service.
	Host string

	// Creds is the credential to use when creating the grpc connection.
	Creds credentials.PerRPCCredentials

	// UserAgent is the optional additional User-Agent fragment which will be
	// appended to gRPC calls
	//
	// If empty, defaultUserAgent is used.
	UserAgent string

	// DialOpts are the options to use to dial.
	//
	// If nil, DefaultDialOptions() are used
	DialOpts []grpc.DialOption
}

Jump to

Keyboard shortcuts

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