We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dacb915 commit 10cd055Copy full SHA for 10cd055
.changelog/72.txt
@@ -0,0 +1,3 @@
1
+```release-note:enhancement
2
+Added `tfsdk.NewProtocol6Server` to return a `tfprotov6.ProviderServer` implementation for testing and muxing purposes.
3
+```
tfsdk/serve.go
@@ -29,6 +29,14 @@ type ServeOpts struct {
29
Name string
30
}
31
32
+// NewProtocol6Server returns a tfprotov6.ProviderServer implementation based
33
+// on the passed Provider implementation.
34
+func NewProtocol6Server(p Provider) tfprotov6.ProviderServer {
35
+ return &server{
36
+ p: p,
37
+ }
38
+}
39
+
40
// Serve serves a provider, blocking until the context is canceled.
41
func Serve(ctx context.Context, factory func() Provider, opts ServeOpts) error {
42
return tf6server.Serve(opts.Name, func() tfprotov6.ProviderServer {
0 commit comments