Movatterモバイル変換


[0]ホーム

URL:


provisionerd

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:23Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeConnectResponseadded inv2.2.0

type ConnectResponse struct {Job    *proto.AcquiredJobClientsdkproto.DRPCProvisionerClientErrorerror}

ConnectResponse is the response returned asynchronously from Connector.Connectcontaining either the Provisioner Client or an Error. The Job is also returnedunaltered to disambiguate responses if the respCh is shared among multiple jobs

typeConnectoradded inv2.2.0

type Connector interface {// Connect to the correct provisioner for the given job. The response is// delivered asynchronously over the respCh.  If the provided context expires,// the Connector may stop waiting for the provisioner and return an error// response.Connect(ctxcontext.Context, job *proto.AcquiredJob, respCh chan<-ConnectResponse)}

Connector allows the provisioner daemon to Connect to a provisionerfor the given job.

typeDialer

Dialer represents the function to create a daemon client connection.

typeLocalProvisionersadded inv2.2.0

type LocalProvisioners map[string]sdkproto.DRPCProvisionerClient

LocalProvisioners is a Connector that stores a static set of in-processprovisioners.

func (LocalProvisioners)Connectadded inv2.2.0

func (lLocalProvisioners) Connect(_context.Context, job *proto.AcquiredJob, respCh chan<-ConnectResponse)

typeMetrics

type Metrics struct {Runnerrunner.Metrics}

typeOptions

type Options struct {Loggerslog.LoggerTracerProvidertrace.TracerProviderMetrics        *MetricsExternalProvisionerboolForceCancelIntervaltime.DurationUpdateIntervaltime.DurationLogBufferIntervaltime.DurationConnectorConnectorInitConnectionCh    chan struct{}// only to be used in tests}

Options provides customizations to the behavior of a provisioner daemon.

typeServer

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

funcNew

func New(clientDialerDialer, opts *Options) *Server

New creates and starts a provisioner daemon.

func (*Server)Close

func (p *Server) Close()error

Close ends the provisioner. It will mark any running jobs as failed.

func (*Server)CompleteJob

func (p *Server) CompleteJob(ctxcontext.Context, in *proto.CompletedJob)error

func (*Server)FailJob

func (p *Server) FailJob(ctxcontext.Context, in *proto.FailedJob)error

func (*Server)Shutdown

func (p *Server) Shutdown(ctxcontext.Context, cancelActiveJobbool)error

Shutdown gracefully exists with the option to cancel the active job.If false, it will wait for the job to complete.

func (*Server)UpdateJob

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