v0.0.0-...-b03fcf3 Latest Latest

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 27 Imported by: 4



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



This section is empty.


This section is empty.


func DefaultDialOptions

func DefaultDialOptions() []grpc.DialOption

DefaultDialOptions returns default grpc dial options to connect to Luci-config v2.

func NewV1

func NewV1(host string, insecure bool, clients ClientFactory) config.Interface

NewV1 returns an implementation of the config service which talks to the actual luci-config service v1 using given transport.

configServiceURL is usually "https://<host>/_ah/api/config/v1/".

ClientFactory returns http.Clients to use for requests (given incoming contexts). It's required mostly to support GAE environment, where round trippers are bound to contexts and carry RPC deadlines.

If 'clients' is nil, http.DefaultClient will be used for all requests.

func NewV2

func NewV2(ctx context.Context, opts V2Options) (config.Interface, error)

NewV2 returns an implementation of the config Interface which talks to the real Luci-config service v2.


type ClientFactory

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

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

See 'NewV1' for more details.

type V2Options

type V2Options 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