Skip to content

Commit a5b102f

Browse files
author
Paddy
authored
Fix README references to routers. (#43)
We removed the routers, but the README still directs people to use them. Oops. This removes them and replaces them with some, admittedly vague, guidance instead. Fixes #40.
1 parent 627de2c commit a5b102f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,13 @@ interface. This type should be passed to
4444
along with the name (like `"hashicorp/time"`).
4545

4646
Resources and data sources can be handled in resource-specific or data
47-
source-specific functions by using
48-
[`tfprotov5.ResourceRouter`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov5#ResourceRouter)
49-
and
50-
[`tfprotov5.DataSourceRouter`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov5#DataSourceRouter)
51-
as embedded values in their `tfprotov5.ProviderServer` implementation type,
52-
falling back on their implementations of the
47+
source-specific functions by using implementations of the
5348
[`tfprotov5.ResourceServer`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov5#ResourceServer)
5449
and
5550
[`tfprotov5.DataSourceServer`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov5#DataSourceServer)
56-
interfaces to split resource and data source requests into single-purpose
57-
functions based on which resource or data source the request is for.
51+
interfaces, using the provider-level implementations of the interfaces to route
52+
to the correct resource or data source level implementations using
53+
`req.TypeName`.
5854

5955
When handling requests,
6056
[`tfprotov5.DynamicValue`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov5#DynamicValue)

0 commit comments

Comments
 (0)