Movatterモバイル変換


[0]ホーム

URL:


provisionersdk

package
v2.29.1Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License:AGPL-3.0Imports:28Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (TagScope = "scope"TagOwner = "owner"ScopeUser         = "user"ScopeOrganization = "organization")
View Source
const (// TemplateArchiveLimit represents the maximum size of a template in bytes.TemplateArchiveLimit = 1 << 20)

Variables

This section is empty.

Functions

funcAgentScriptEnv

func AgentScriptEnv() map[string]string

AgentScriptEnv returns a key-pair of scripts that are consumed by the Coder Terraform Provider.https://github.com/coder/terraform-provider-coder/blob/main/provider/agent.go (updateInitScript)performs additional string substitutions.

funcApplyErrorfadded inv2.1.4

func ApplyErrorf(formatstring, args ...any) *proto.ApplyComplete

funcDefaultDisplayAppsadded inv2.1.5

func DefaultDisplayApps() *proto.DisplayApps

DefaultDisplayApps returns the default display applications to enableif none are specified in a template.

funcDirHasLockfile

func DirHasLockfile(dirstring) (bool,error)

funcMutateTagsadded inv2.5.0

func MutateTags(userIDuuid.UUID, provided ...map[string]string) map[string]string

MutateTags adjusts the "owner" tag dependent on the "scope".If the scope is "user", the "owner" is changed to the user ID.This is for user-scoped provisioner daemons, where users shouldown their own operations.Multiple sets of tags may be passed to this function; they willbe merged into one single tag set.Otherwise, the "owner" tag is always an empty string.NOTE: "owner" must NEVER be nil. Otherwise it will end up beingduplicated in the database, as idx_provisioner_daemons_name_owner_keyis a partial unique index that includes a JSON field.

funcParseErrorfadded inv2.1.4

func ParseErrorf(formatstring, args ...any) *proto.ParseComplete

funcPlanErrorfadded inv2.1.4

func PlanErrorf(formatstring, args ...any) *proto.PlanComplete

funcProvisionerJobLogsNotifyChannel

func ProvisionerJobLogsNotifyChannel(jobIDuuid.UUID)string

ProvisionerJobLogsNotifyChannel is the PostgreSQL NOTIFY channelto publish updates to job logs on.

funcServe

func Serve(ctxcontext.Context, serverServer, options *ServeOptions)error

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

funcTar

func Tar(wio.Writer, loggerslog.Logger, directorystring, limitint64)error

Tar archives a Terraform directory.

funcUntar

func Untar(directorystring, rio.Reader)error

Untar extracts the archive to a provided directory.

Types

typeProvisionerJobLogsNotifyMessage

type ProvisionerJobLogsNotifyMessage struct {CreatedAfterint64 `json:"created_after"`EndOfLogsbool  `json:"end_of_logs,omitempty"`}

ProvisionerJobLogsNotifyMessage is the payload published onthe provisioner job logs notify channel.

typeServeOptions

type ServeOptions struct {// Listener serves multiple connections. Cannot be combined with Conn.Listenernet.Listener// Conn is a single connection to serve. Cannot be combined with Listener.Conndrpc.TransportLoggerslog.LoggerWorkDirectorystringExternalProvisionerboolExperimentscodersdk.Experiments}

ServeOptions are configurations to serve a provisioner.

typeServeradded inv2.1.4

type Server interface {Parse(s *Session, r *proto.ParseRequest, canceledOrComplete <-chan struct{}) *proto.ParseCompletePlan(s *Session, r *proto.PlanRequest, canceledOrComplete <-chan struct{}) *proto.PlanCompleteApply(s *Session, r *proto.ApplyRequest, canceledOrComplete <-chan struct{}) *proto.ApplyComplete}

typeSessionadded inv2.1.4

type Session struct {Loggerslog.LoggerFilestfpath.LayouterConfig *proto.Config// contains filtered or unexported fields}

func (*Session)Contextadded inv2.1.4

func (s *Session) Context()context.Context

func (*Session)ProvisionLogadded inv2.1.4

func (s *Session) ProvisionLog(levelproto.LogLevel, outputstring)

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp