Documentation
¶
Overview ¶
Package remote provides a backend that executes code on a remote runtime service. Generic target for dedicated runtime services, batch systems, or job runners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRemoteNotAvailable is returned when the remote service is not available. ErrRemoteNotAvailable = errors.New("remote service not available") // ErrConnectionFailed is returned when connection to remote service fails. ErrConnectionFailed = errors.New("connection to remote service failed") // ErrRemoteExecutionFailed is returned when remote execution fails. ErrRemoteExecutionFailed = errors.New("remote execution failed") )
Errors for remote backend operations.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend executes code on a remote runtime service.
func (*Backend) Execute ¶
func (b *Backend) Execute(_ context.Context, req runtime.ExecuteRequest) (runtime.ExecuteResult, error)
Execute runs code on the remote runtime service.
func (*Backend) Kind ¶
func (b *Backend) Kind() runtime.BackendKind
Kind returns the backend kind identifier.
type Config ¶
type Config struct {
// Endpoint is the URL of the remote runtime service.
// Required.
Endpoint string
// AuthToken is the authentication token for the remote service.
AuthToken string
// TLSSkipVerify skips TLS certificate verification.
// WARNING: Only use for development.
TLSSkipVerify bool
// TimeoutOverhead is additional timeout added to account for network latency.
// Default: 5s
TimeoutOverhead time.Duration
// MaxRetries is the maximum number of retries on transient failures.
// Default: 3
MaxRetries int
// Logger is an optional logger for backend events.
Logger Logger
}
Config configures a remote backend.
Click to show internal directories.
Click to hide internal directories.