provisionerd
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- type ConnectResponse
- type Connector
- type Dialer
- type LocalProvisioners
- type Metrics
- type Options
- type Server
- func (p *Server) Close() error
- func (p *Server) CommitQuota(ctx context.Context, in *proto.CommitQuotaRequest) (*proto.CommitQuotaResponse, error)
- func (p *Server) CompleteJob(ctx context.Context, in *proto.CompletedJob) error
- func (p *Server) FailJob(ctx context.Context, in *proto.FailedJob) error
- func (p *Server) Shutdown(ctx context.Context, cancelActiveJob bool) error
- func (p *Server) UpdateJob(ctx context.Context, in *proto.UpdateJobRequest) (*proto.UpdateJobResponse, error)
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeConnectResponse¶added 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
typeConnector¶added 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¶
type Dialer func(ctxcontext.Context) (proto.DRPCProvisionerDaemonClient,error)
Dialer represents the function to create a daemon client connection.
typeLocalProvisioners¶added inv2.2.0
type LocalProvisioners map[string]sdkproto.DRPCProvisionerClient
LocalProvisioners is a Connector that stores a static set of in-processprovisioners.
func (LocalProvisioners)Connect¶added inv2.2.0
func (lLocalProvisioners) Connect(_context.Context, job *proto.AcquiredJob, respCh chan<-ConnectResponse)
typeMetrics¶
funcNewMetrics¶
func NewMetrics(regprometheus.Registerer)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}
func (*Server)CommitQuota¶
func (p *Server) CommitQuota(ctxcontext.Context, in *proto.CommitQuotaRequest) (*proto.CommitQuotaResponse,error)
func (*Server)CompleteJob¶
func (*Server)Shutdown¶
Shutdown gracefully exists with the option to cancel the active job.If false, it will wait for the job to complete.
func (*Server)UpdateJob¶
func (p *Server) UpdateJob(ctxcontext.Context, in *proto.UpdateJobRequest) (*proto.UpdateJobResponse,error)