provisionerd

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMissingParameterErrorCode added in v0.19.0

func IsMissingParameterErrorCode(code string) bool

IsMissingParameterErrorCode returns whether the error is a missing parameter error. This can indicate to consumers that they should check parameters.

Types

type Dialer

Dialer represents the function to create a daemon client connection.

type Metrics added in v0.12.3

type Metrics struct {
	Runner runner.Metrics
}

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 New

func New(clientDialer Dialer, 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) CommitQuota added in v0.12.7

func (*Server) CompleteJob added in v0.7.7

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

func (*Server) FailJob added in v0.7.7

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

func (*Server) Shutdown

func (p *Server) Shutdown(ctx context.Context) error

Shutdown triggers a graceful exit of each registered provisioner. It exits when an active job stops.

func (*Server) UpdateJob added in v0.7.7

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy