luci: Index | Files

package client

import ""

Package client implements a config client backend for a configuration client.


Package Files


type Backend Uses

type Backend struct {
    Provider Provider

Backend returns a backend.B implementation that falls through to the supplied configuration service client's config.Interface, supplied by the Provider.

url is the base URL to the configuration service, e.g.,

func (*Backend) Get Uses

func (be *Backend) Get(c context.Context, configSet config.Set, path string, p backend.Params) (*config.Config, error)

Get implements backend.B.

func (*Backend) GetAll Uses

func (be *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) (
    []*config.Config, error)

GetAll implements backend.B.

func (*Backend) GetConfigInterface Uses

func (be *Backend) GetConfigInterface(c context.Context, a backend.Authority) config.Interface

GetConfigInterface implements backend.B.

func (*Backend) ServiceURL Uses

func (be *Backend) ServiceURL(c context.Context) url.URL

ServiceURL implements backend.B.

type Provider Uses

type Provider interface {
    GetServiceURL() url.URL
    GetConfigClient(context.Context, backend.Authority) config.Interface

Provider returns a config.Interface for the supplied parameters.

type RemoteProvider Uses

type RemoteProvider struct {
    // Host is the base host name of the configuration service, e.g.,
    // "".
    Host string
    // Insecure is true if the connection should use HTTP instead of HTTPS.
    Insecure bool
    // contains filtered or unexported fields

RemoteProvider is a Provider implementation that binds to a remote configuration service.

func (*RemoteProvider) GetConfigClient Uses

func (p *RemoteProvider) GetConfigClient(ctx context.Context, a backend.Authority) config.Interface

GetConfigClient implements Provider.

func (*RemoteProvider) GetServiceURL Uses

func (p *RemoteProvider) GetServiceURL() url.URL

GetServiceURL implements Provider.

Package client imports 10 packages (graph) and is imported by 4 packages. Updated 2020-04-07. Refresh now. Tools for package owners.