Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveredRemoteService ¶
type DiscoveredRemoteService struct { // URL holds the host name that returned the service discovery payload. // The URLs host can be different from the initial request host due to redirects. // It is the base URL for relative provider paths. URL url.URL WellKnownEndpointResponse }
DiscoveredRemoteService holds the information retrieved during the discovery process
type Discovery ¶
type Discovery struct { LoginV1 *LoginV1 `json:"login.v1,omitempty"` ModulesV1 string `json:"modules.v1,omitempty"` ProvidersV1 string `json:"providers.v1,omitempty"` }
See https://developer.hashicorp.com/terraform/internals/remote-service-discovery
type Option ¶
type Option func(*Discovery)
func WithLoginV1 ¶
func WithModulesV1 ¶
func WithProvidersV1 ¶
type RemoteServiceDiscovery ¶
type RemoteServiceDiscovery struct {
// contains filtered or unexported fields
}
The RemoteServiceDiscovery struct caches HTTP path prefixes for providers which were discovered over the well-known service discovery mechanism. See: https://developer.hashicorp.com/terraform/internals/remote-service-discovery
func (*RemoteServiceDiscovery) Resolve ¶
func (r *RemoteServiceDiscovery) Resolve(ctx context.Context, host string) (*DiscoveredRemoteService, error)
Resolve returns the relative provider path for a given URL
type ServiceDiscoveryResolver ¶
type ServiceDiscoveryResolver interface {
Resolve(ctx context.Context, host string) (*DiscoveredRemoteService, error)
}
func NewRemoteServiceDiscovery ¶
func NewRemoteServiceDiscovery(client *http.Client) ServiceDiscoveryResolver
Click to show internal directories.
Click to hide internal directories.