provider

package
v3.115.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 23 Imported by: 80

Documentation

Overview

Package provider contains logic for setting up RPC connections to provider plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentMain

func ComponentMain(name, version string, schema []byte, construct provider.ConstructFunc) error

ComponentMain is an entrypoint for a resource provider plugin that implements `Construct` for component resources. Using it isn't required but can cut down significantly on the amount of boilerplate necessary to fire up a new resource provider for components.

func Main

func Main(name string, provMaker func(*HostClient) (pulumirpc.ResourceProviderServer, error)) error

Main is the typical entrypoint for a resource provider plugin. Using it isn't required but can cut down significantly on the amount of boilerplate necessary to fire up a new resource provider.

func MainWithOptions added in v3.9.1

func MainWithOptions(opts Options) error

MainWithOptions is an entrypoint for a resource provider plugin that implements `Construct` and optionally also `Call` for component resources.

Using it isn't required but can cut down significantly on the amount of boilerplate necessary to fire up a new resource provider for components.

Types

type HostClient

type HostClient struct {
	// contains filtered or unexported fields
}

HostClient is a client interface into the host's engine RPC interface.

func NewHostClient

func NewHostClient(addr string) (*HostClient, error)

NewHostClient dials the target address, connects over gRPC, and returns a client interface.

func (*HostClient) Close

func (host *HostClient) Close() error

Close closes and renders the connection and client unusable.

func (*HostClient) EngineConn

func (host *HostClient) EngineConn() *grpc.ClientConn

EngineConn provides the engine gRPC client connection.

func (*HostClient) Log

func (host *HostClient) Log(
	context context.Context, sev diag.Severity, urn resource.URN, msg string,
) error

Log logs a global message, including errors and warnings.

func (*HostClient) LogStatus

func (host *HostClient) LogStatus(
	context context.Context, sev diag.Severity, urn resource.URN, msg string,
) error

LogStatus logs a global status message, including errors and warnings. Status messages will appear in the `Info` column of the progress display, but not in the final output.

type Options added in v3.9.1

type Options struct {
	Name      string
	Version   string
	Schema    []byte
	Construct provider.ConstructFunc
	Call      provider.CallFunc
}

Jump to

Keyboard shortcuts

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