Skip to content

Commit

Permalink
Merge pull request #34383 from hashicorp/jbardin/provider-functions-p…
Browse files Browse the repository at this point in the history
…roto

Add protobuf for provider-defined functions
  • Loading branch information
jbardin authored Dec 14, 2023
2 parents ebb8b50 + 5c8fd0b commit 78b30b7
Show file tree
Hide file tree
Showing 10 changed files with 4,553 additions and 1,530 deletions.
534 changes: 534 additions & 0 deletions docs/plugin-protocol/tfplugin5.5.proto

Large diffs are not rendered by default.

514 changes: 514 additions & 0 deletions docs/plugin-protocol/tfplugin6.5.proto

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions internal/grpcwrap/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,16 @@ func (p *provider) ReadDataSource(_ context.Context, req *tfplugin5.ReadDataSour
return resp, nil
}

func (p *provider) GetFunctions(context.Context, *tfplugin5.GetFunctions_Request) (*tfplugin5.GetFunctions_Response, error) {
panic("unimplemented")
return nil, nil
}

func (p *provider) CallFunction(_ context.Context, req *tfplugin5.CallFunction_Request) (*tfplugin5.CallFunction_Response, error) {
panic("unimplemented")
return nil, nil
}

func (p *provider) Stop(context.Context, *tfplugin5.Stop_Request) (*tfplugin5.Stop_Response, error) {
resp := &tfplugin5.Stop_Response{}
err := p.provider.Stop()
Expand Down
10 changes: 10 additions & 0 deletions internal/grpcwrap/provider6.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,16 @@ func (p *provider6) ReadDataSource(_ context.Context, req *tfplugin6.ReadDataSou
return resp, nil
}

func (p *provider6) GetFunctions(context.Context, *tfplugin6.GetFunctions_Request) (*tfplugin6.GetFunctions_Response, error) {
panic("unimplemented")
return nil, nil
}

func (p *provider6) CallFunction(_ context.Context, req *tfplugin6.CallFunction_Request) (*tfplugin6.CallFunction_Response, error) {
panic("unimplemented")
return nil, nil
}

func (p *provider6) StopProvider(context.Context, *tfplugin6.StopProvider_Request) (*tfplugin6.StopProvider_Response, error) {
resp := &tfplugin6.StopProvider_Response{}
err := p.provider.Stop()
Expand Down
40 changes: 40 additions & 0 deletions internal/plugin/mock_proto/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions internal/plugin6/mock_proto/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 78b30b7

Please sign in to comment.