Documentation ¶
Overview ¶
Package client implements a config client backend for a configuration client.
Index ¶
- type Backend
- func (be *Backend) Get(c context.Context, configSet config.Set, path string, p backend.Params) (*config.Config, error)
- func (be *Backend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) ([]*config.Config, error)
- func (be *Backend) GetConfigInterface(c context.Context, a backend.Authority) config.Interface
- func (be *Backend) ServiceURL(c context.Context) url.URL
- type Provider
- type RemoteProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
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., https://example.appspot.com.
func (*Backend) Get ¶
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 ¶
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 ¶
GetConfigInterface implements backend.B.
type Provider ¶
type Provider interface { GetServiceURL() url.URL GetConfigClient(context.Context, backend.Authority) config.Interface }
Provider returns a config.Interface for the supplied parameters.
type RemoteProvider ¶
type RemoteProvider struct { // Host is the base host name of the configuration service, e.g., // "example.appspot.com". 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 ¶
GetConfigClient implements Provider.
func (*RemoteProvider) GetServiceURL ¶
func (p *RemoteProvider) GetServiceURL() url.URL
GetServiceURL implements Provider.