Help us shape the future of Go! Take the 2026 Go Developer Survey

exec

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 20 Imported by: 0

README

Exec

The Exec plugin executes any command to perform a deploy. This enables the use of pre-existing deployment tools.

Components

  1. Platform
  1. Docker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_waypoint_builtin_exec_plugin_proto protoreflect.FileDescriptor
View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Platform{}),
	sdk.WithMappers(DockerImageMapper),
}

Options are the SDK options to use for instantiation.

Functions

This section is empty.

Types

type ConfigTemplate

type ConfigTemplate struct {
	// Path is the path to the file or directory to template.
	Path string `hcl:"path,attr"`
}

type Deployment

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

func (*Deployment) Descriptor deprecated

func (*Deployment) Descriptor() ([]byte, []int)

Deprecated: Use Deployment.ProtoReflect.Descriptor instead.

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) ProtoReflect

func (x *Deployment) ProtoReflect() protoreflect.Message

func (*Deployment) Reset

func (x *Deployment) Reset()

func (*Deployment) String

func (x *Deployment) String() string

type Input

type Input struct {
	Data map[string]*Input_Value `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input is the input type used for the exec plugin.

func DockerImageMapper

func DockerImageMapper(src *docker.Image) *Input

DockerImageMapper maps a docker.Image to our Input structure.

func (*Input) Descriptor deprecated

func (*Input) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetData

func (x *Input) GetData() map[string]*Input_Value

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

type Input_Value

type Input_Value struct {

	// Types that are assignable to Value:
	//
	//	*Input_Value_Text
	Value isInput_Value_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*Input_Value) Descriptor deprecated

func (*Input_Value) Descriptor() ([]byte, []int)

Deprecated: Use Input_Value.ProtoReflect.Descriptor instead.

func (*Input_Value) GetText

func (x *Input_Value) GetText() string

func (*Input_Value) GetValue

func (m *Input_Value) GetValue() isInput_Value_Value

func (*Input_Value) ProtoMessage

func (*Input_Value) ProtoMessage()

func (*Input_Value) ProtoReflect

func (x *Input_Value) ProtoReflect() protoreflect.Message

func (*Input_Value) Reset

func (x *Input_Value) Reset()

func (*Input_Value) String

func (x *Input_Value) String() string

type Input_Value_Text

type Input_Value_Text struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type Platform

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

Platform is the Platform implementation for exec.

func (*Platform) Config

func (p *Platform) Config() (interface{}, error)

Config implements Configurable

func (*Platform) Deploy

func (p *Platform) Deploy(
	ctx context.Context,
	log hclog.Logger,
	src *component.Source,
	job *component.JobInfo,
	input *Input,
	deployConfig *component.DeploymentConfig,
	ui terminal.UI,
) (*Deployment, error)

Deploy deploys an image to exec.

func (*Platform) DeployFunc

func (p *Platform) DeployFunc() interface{}

DeployFunc implements component.Platform

func (*Platform) Documentation

func (p *Platform) Documentation() (*docs.Documentation, error)

type PlatformConfig

type PlatformConfig struct {
	// The command to execute. The string value "<TPL>" will be replaced
	// with the rendered template. If the template is a file, the value of
	// TPL will be a file. If the template is a directory, TPL will be a path
	// to a directory.
	Command []string `hcl:"command,optional"`

	// Dir is the working directory to set when executing the command.
	// This will default to the path to the application in the Waypoint
	// configuration.
	Dir string `hcl:"dir,optional"`

	// Template is the template to render.
	Template *ConfigTemplate `hcl:"template,block"`
}

PlatformConfig is the configuration structure for the Platform.

Jump to

Keyboard shortcuts

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