Documentation ¶
Overview ¶
Package transport provides a round tripper capable of caching HTTP responses.
Index ¶
- func Convert(item, out interface{}) error
- func NewCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripper
- func Provider() terraform.ResourceProvider
- type APIGroup
- type AddOperation
- type CachedDiscoveryClient
- func (d *CachedDiscoveryClient) Fresh() bool
- func (d *CachedDiscoveryClient) Invalidate()
- func (d *CachedDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error)
- func (d *CachedDiscoveryClient) RESTClient() restclient.Interface
- func (d *CachedDiscoveryClient) ServerGroups() (*metav1.APIGroupList, error)
- func (d *CachedDiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
- func (d *CachedDiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error)
- func (d *CachedDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error)
- func (d *CachedDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
- func (d *CachedDiscoveryClient) ServerVersion() (*version.Info, error)
- type PatchOperation
- type PatchOperations
- type RemoveOperation
- type ReplaceOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(item, out interface{}) error
Convert between two types by converting to/from JSON. Intended to switch between multiple API versions, as they are strict supersets of one another. item and out are pointers to structs
func NewCacheRoundTripper ¶
func NewCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripper
NewCacheRoundTripper creates a roundtripper that reads the ETag on response headers and send the If-None-Match header on subsequent corresponding requests.
func Provider ¶
func Provider() terraform.ResourceProvider
Types ¶
type AddOperation ¶
type AddOperation struct { Path string `json:"path"` Value interface{} `json:"value"` Op string `json:"op"` }
func (*AddOperation) GetPath ¶
func (o *AddOperation) GetPath() string
func (*AddOperation) MarshalJSON ¶
func (o *AddOperation) MarshalJSON() ([]byte, error)
func (*AddOperation) String ¶
func (o *AddOperation) String() string
type CachedDiscoveryClient ¶
type CachedDiscoveryClient struct {
// contains filtered or unexported fields
}
CachedDiscoveryClient implements the functions that discovery server-supported API groups, versions and resources.
func NewCachedDiscoveryClient ¶
func NewCachedDiscoveryClient(delegate discovery.DiscoveryInterface, cacheDirectory string, ttl time.Duration) *CachedDiscoveryClient
NewCachedDiscoveryClient creates a new DiscoveryClient. cacheDirectory is the directory where discovery docs are held. It must be unique per host:port combination to work well.
func (*CachedDiscoveryClient) Fresh ¶
func (d *CachedDiscoveryClient) Fresh() bool
func (*CachedDiscoveryClient) Invalidate ¶
func (d *CachedDiscoveryClient) Invalidate()
func (*CachedDiscoveryClient) OpenAPISchema ¶
func (d *CachedDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error)
func (*CachedDiscoveryClient) RESTClient ¶
func (d *CachedDiscoveryClient) RESTClient() restclient.Interface
func (*CachedDiscoveryClient) ServerGroups ¶
func (d *CachedDiscoveryClient) ServerGroups() (*metav1.APIGroupList, error)
func (*CachedDiscoveryClient) ServerPreferredNamespacedResources ¶
func (d *CachedDiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
func (*CachedDiscoveryClient) ServerPreferredResources ¶
func (d *CachedDiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error)
func (*CachedDiscoveryClient) ServerResources ¶
func (d *CachedDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error)
ServerResources returns the supported resources for all groups and versions.
func (*CachedDiscoveryClient) ServerResourcesForGroupVersion ¶
func (d *CachedDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
ServerResourcesForGroupVersion returns the supported resources for a group and version.
func (*CachedDiscoveryClient) ServerVersion ¶
func (d *CachedDiscoveryClient) ServerVersion() (*version.Info, error)
type PatchOperation ¶
type PatchOperations ¶
type PatchOperations []PatchOperation
func (PatchOperations) Equal ¶
func (po PatchOperations) Equal(ops []PatchOperation) bool
func (PatchOperations) MarshalJSON ¶
func (po PatchOperations) MarshalJSON() ([]byte, error)
type RemoveOperation ¶
func (*RemoveOperation) GetPath ¶
func (o *RemoveOperation) GetPath() string
func (*RemoveOperation) MarshalJSON ¶
func (o *RemoveOperation) MarshalJSON() ([]byte, error)
func (*RemoveOperation) String ¶
func (o *RemoveOperation) String() string
type ReplaceOperation ¶
type ReplaceOperation struct { Path string `json:"path"` Value interface{} `json:"value"` Op string `json:"op"` }
func (*ReplaceOperation) GetPath ¶
func (o *ReplaceOperation) GetPath() string
func (*ReplaceOperation) MarshalJSON ¶
func (o *ReplaceOperation) MarshalJSON() ([]byte, error)
func (*ReplaceOperation) String ¶
func (o *ReplaceOperation) String() string
Source Files ¶
- api_versions.go
- cached_discovery.go
- data_souce_helpers.go
- data_source_kubernetes_deployment.go
- data_source_kubernetes_secret.go
- data_source_kubernetes_service.go
- data_source_kubernetes_storage_class.go
- diff_supress_funcs.go
- event_helpers.go
- patch_operations.go
- provider.go
- resource_kubernetes_cluster_role.go
- resource_kubernetes_cluster_role_binding.go
- resource_kubernetes_config_map.go
- resource_kubernetes_cron_job.go
- resource_kubernetes_daemonset.go
- resource_kubernetes_deployment.go
- resource_kubernetes_horizontal_pod_autoscaler.go
- resource_kubernetes_ingress.go
- resource_kubernetes_job.go
- resource_kubernetes_limit_range.go
- resource_kubernetes_namespace.go
- resource_kubernetes_persistent_volume.go
- resource_kubernetes_persistent_volume_claim.go
- resource_kubernetes_pod.go
- resource_kubernetes_replication_controller.go
- resource_kubernetes_resource_quota.go
- resource_kubernetes_role.go
- resource_kubernetes_role_binding.go
- resource_kubernetes_secret.go
- resource_kubernetes_service.go
- resource_kubernetes_service_account.go
- resource_kubernetes_stateful_set.go
- resource_kubernetes_storage_class.go
- round_tripper.go
- schema_affinity_spec.go
- schema_backend_spec.go
- schema_container.go
- schema_cron_job_spec.go
- schema_job_spec.go
- schema_label_selector.go
- schema_metadata.go
- schema_persistent_volume_claim_spec.go
- schema_pod_spec.go
- schema_rbac.go
- schema_volume_source.go
- structure_cron_job.go
- structure_horizontal_pod_autoscaler.go
- structure_ingress_spec.go
- structure_job.go
- structure_label_selector.go
- structure_persistent_volume_claim.go
- structure_persistent_volume_spec.go
- structure_service_spec.go
- structures.go
- structures_affinity.go
- structures_container.go
- structures_daemonset.go
- structures_deployment.go
- structures_pod.go
- structures_rbac.go
- structures_replication_controller.go
- structures_stateful_set.go
- validators.go