provisionersdk

package
v0.23.6 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxMessageSize is the maximum payload size that can be
	// transported without error.
	MaxMessageSize = 4 << 20
)
View Source
const (
	// TemplateArchiveLimit represents the maximum size of a template in bytes.
	TemplateArchiveLimit = 1 << 20
)

Variables

This section is empty.

Functions

func AgentScriptEnv

func AgentScriptEnv() map[string]string

AgentScriptEnv returns a key-pair of scripts that are consumed by the Coder Terraform Provider. See: https://github.com/coder/terraform-provider-coder/blob/main/internal/provider/provider.go#L97

func MemTransportPipe added in v0.13.0

func MemTransportPipe() (drpc.Conn, net.Listener)

func MultiplexedConn added in v0.13.0

func MultiplexedConn(session *yamux.Session) drpc.Conn

MultiplexedConn returns a multiplexed dRPC connection from a yamux session.

func Serve

func Serve(ctx context.Context, server proto.DRPCProvisionerServer, options *ServeOptions) error

Serve starts a dRPC connection for the provisioner and transport provided.

func Tar

func Tar(w io.Writer, directory string, limit int64) error

Tar archives a Terraform directory.

func Untar

func Untar(directory string, r io.Reader) error

Untar extracts the archive to a provided directory.

Types

type ServeOptions

type ServeOptions struct {
	// Conn specifies a custom transport to serve the dRPC connection.
	Listener net.Listener
}

ServeOptions are configurations to serve a provisioner.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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