deploytest

package
v0.16.15 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLanguageRuntime

func NewLanguageRuntime(program ProgramFunc, requiredPlugins ...workspace.PluginInfo) plugin.LanguageRuntime

func NewPluginHost

func NewPluginHost(sink, statusSink diag.Sink, languageRuntime plugin.LanguageRuntime,
	providerLoaders ...*ProviderLoader) plugin.Host

Types

type BackendClient added in v0.16.6

type BackendClient struct {
	GetStackOutputsF func(ctx context.Context, name string) (resource.PropertyMap, error)
}

BackendClient provides a simple implementation of deploy.BackendClient that defers to a function value.

func (*BackendClient) GetStackOutputs added in v0.16.6

func (b *BackendClient) GetStackOutputs(ctx context.Context, name string) (resource.PropertyMap, error)

GetStackOutputs returns the outputs (if any) for the named stack or an error if the stack cannot be found.

type LoadProviderFunc

type LoadProviderFunc func() (plugin.Provider, error)

type LoadProviderWithHostFunc added in v0.16.9

type LoadProviderWithHostFunc func(host plugin.Host) (plugin.Provider, error)

type ProgramFunc

type ProgramFunc func(runInfo plugin.RunInfo, monitor *ResourceMonitor) error

type Provider

type Provider struct {
	Name    string
	Package tokens.Package
	Version semver.Version

	CheckConfigF func(olds, news resource.PropertyMap) (resource.PropertyMap, []plugin.CheckFailure, error)
	DiffConfigF  func(olds, news resource.PropertyMap) (plugin.DiffResult, error)
	ConfigureF   func(news resource.PropertyMap) error

	CheckF func(urn resource.URN,
		olds, news resource.PropertyMap) (resource.PropertyMap, []plugin.CheckFailure, error)
	DiffF   func(urn resource.URN, id resource.ID, olds, news resource.PropertyMap) (plugin.DiffResult, error)
	CreateF func(urn resource.URN,
		inputs resource.PropertyMap) (resource.ID, resource.PropertyMap, resource.Status, error)
	UpdateF func(urn resource.URN, id resource.ID,
		olds, news resource.PropertyMap) (resource.PropertyMap, resource.Status, error)
	DeleteF func(urn resource.URN, id resource.ID, olds resource.PropertyMap) (resource.Status, error)

	ReadF func(urn resource.URN, id resource.ID,
		props resource.PropertyMap) (resource.PropertyMap, resource.Status, error)
	InvokeF func(tok tokens.ModuleMember,
		inputs resource.PropertyMap) (resource.PropertyMap, []plugin.CheckFailure, error)

	CancelF func() error
	// contains filtered or unexported fields
}

func (*Provider) Check

func (prov *Provider) Check(urn resource.URN,
	olds, news resource.PropertyMap, _ bool) (resource.PropertyMap, []plugin.CheckFailure, error)

func (*Provider) CheckConfig

func (prov *Provider) CheckConfig(olds,
	news resource.PropertyMap) (resource.PropertyMap, []plugin.CheckFailure, error)

func (*Provider) Close

func (prov *Provider) Close() error

func (*Provider) Configure

func (prov *Provider) Configure(inputs resource.PropertyMap) error

func (*Provider) Create

func (*Provider) Delete

func (prov *Provider) Delete(urn resource.URN,
	id resource.ID, props resource.PropertyMap) (resource.Status, error)

func (*Provider) Diff

func (*Provider) DiffConfig

func (prov *Provider) DiffConfig(olds, news resource.PropertyMap) (plugin.DiffResult, error)

func (*Provider) GetPluginInfo

func (prov *Provider) GetPluginInfo() (workspace.PluginInfo, error)

func (*Provider) Invoke

func (*Provider) Pkg

func (prov *Provider) Pkg() tokens.Package

func (*Provider) Read

func (*Provider) SignalCancellation

func (prov *Provider) SignalCancellation() error

func (*Provider) Update

type ProviderLoader

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

func NewProviderLoader

func NewProviderLoader(pkg tokens.Package, version semver.Version, load LoadProviderFunc) *ProviderLoader

func NewProviderLoaderWithHost added in v0.16.9

func NewProviderLoaderWithHost(pkg tokens.Package, version semver.Version,
	load LoadProviderWithHostFunc) *ProviderLoader

type ResourceMonitor

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

func (*ResourceMonitor) Invoke

func (*ResourceMonitor) ReadResource

func (rm *ResourceMonitor) ReadResource(t tokens.Type, name string, id resource.ID, parent resource.URN,
	inputs resource.PropertyMap, provider string) (resource.URN, resource.PropertyMap, error)

func (*ResourceMonitor) RegisterResource

func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom bool, parent resource.URN, protect bool,
	dependencies []resource.URN, provider string, inputs resource.PropertyMap,
	propertyDeps map[resource.PropertyKey][]resource.URN,
	deleteBeforeReplace bool) (resource.URN, resource.ID, resource.PropertyMap, error)

Jump to

Keyboard shortcuts

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