Documentation
¶
Index ¶
- func IsMissingParameterErrorCode(code string) bool
- type Dialer
- type Metrics
- type Options
- type Provisioners
- 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) 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 ¶
func IsMissingParameterErrorCode ¶ added in v0.19.0
IsMissingParameterErrorCode returns whether the error is a missing parameter error. This can indicate to consumers that they should check parameters.
Types ¶
type Dialer ¶
type Dialer func(ctx context.Context) (proto.DRPCProvisionerDaemonClient, error)
Dialer represents the function to create a daemon client connection.
type Metrics ¶ added in v0.12.3
func NewMetrics ¶ added in v0.12.3
func NewMetrics(reg prometheus.Registerer) Metrics
type Options ¶
type Options struct { Filesystem afero.Fs Logger slog.Logger TracerProvider trace.TracerProvider Metrics *Metrics ForceCancelInterval time.Duration UpdateInterval time.Duration LogBufferInterval time.Duration JobPollInterval time.Duration JobPollJitter time.Duration JobPollDebounce time.Duration Provisioners Provisioners // WorkDirectory must not be used by multiple processes at once. WorkDirectory string }
Options provides customizations to the behavior of a provisioner daemon.
type Provisioners ¶
type Provisioners map[string]sdkproto.DRPCProvisionerClient
Provisioners maps provisioner ID to implementation.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CommitQuota ¶ added in v0.12.7
func (p *Server) CommitQuota(ctx context.Context, in *proto.CommitQuotaRequest) (*proto.CommitQuotaResponse, error)
func (*Server) CompleteJob ¶ added in v0.7.7
func (*Server) Shutdown ¶
Shutdown triggers a graceful exit of each registered provisioner. It exits when an active job stops.
func (*Server) UpdateJob ¶ added in v0.7.7
func (p *Server) UpdateJob(ctx context.Context, in *proto.UpdateJobRequest) (*proto.UpdateJobResponse, error)
Click to show internal directories.
Click to hide internal directories.