Documentation ¶
Index ¶
- Constants
- func AgentScriptEnv() map[string]string
- func Conn(session *yamux.Session) drpc.Conn
- func Serve(ctx context.Context, server proto.DRPCProvisionerServer, options *ServeOptions) error
- func Tar(directory string, limit int64) ([]byte, error)
- func TransportPipe() (*yamux.Session, *yamux.Session)
- func Untar(directory string, archive []byte) error
- type ServeOptions
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 ¶
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 Serve ¶
func Serve(ctx context.Context, server proto.DRPCProvisionerServer, options *ServeOptions) error
Serve starts a dRPC connection for the provisioner and transport provided.
func TransportPipe ¶
TransportPipe creates an in-memory pipe for dRPC transport.
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.
Click to show internal directories.
Click to hide internal directories.