providerserver

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2022 License: MPL-2.0 Imports: 8 Imported by: 613

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProtocol6

func NewProtocol6(p tfsdk.Provider) func() tfprotov6.ProviderServer

NewProtocol6 returns a protocol version 6 ProviderServer implementation based on the given Provider and suitable for usage with the github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.Serve() function and various terraform-plugin-mux functions.

func NewProtocol6WithError

func NewProtocol6WithError(p tfsdk.Provider) func() (tfprotov6.ProviderServer, error)

NewProtocol6WithError returns a protocol version 6 ProviderServer implementation based on the given Provider and suitable for usage with github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.TestCase.ProtoV6ProviderFactories.

The error return is not currently used, but it may be in the future.

func Serve

func Serve(ctx context.Context, providerFunc func() tfsdk.Provider, opts ServeOpts) error

Serve serves a provider, blocking until the context is canceled.

Types

type ServeOpts

type ServeOpts struct {
	// Address is the full address of the provider. Full address form has three
	// parts separated by forward slashes (/): Hostname, namespace, and
	// provider type ("name").
	//
	// For example: registry.terraform.io/hashicorp/random.
	Address string

	// Debug runs the provider in a mode acceptable for debugging and testing
	// processes, such as delve, by managing the process lifecycle. Information
	// needed for Terraform CLI to connect to the provider is output to stdout.
	// os.Interrupt (Ctrl-c) can be used to stop the provider.
	Debug bool
}

ServeOpts are options for serving the provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL