Documentation ¶
Index ¶
- func AuthenticateProvisioner(conn io.ReadWriter, token, jobID string) error
- func DialTLS(ctx context.Context, cert, addr string) (*tls.Conn, error)
- func EphemeralEcho(ctx context.Context, logger slog.Logger, ...) error
- func GenCert() (*ecdsa.PrivateKey, []byte, error)
- func NewRemoteConnector(ctx context.Context, logger slog.Logger, exec Executor) (agpl.Connector, error)
- type Executor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateProvisioner ¶
func AuthenticateProvisioner(conn io.ReadWriter, token, jobID string) error
AuthenticateProvisioner performs the provisioner's side of the authentication protocol.
func DialTLS ¶
DialTLS establishes a TLS connection to the given addr using the given cert as the root CA
func EphemeralEcho ¶
func EphemeralEcho( ctx context.Context, logger slog.Logger, cacheDir, jobID, token, daemonCert, daemonAddress string, ) error
EphemeralEcho starts an Echo provisioner that connects to provisioner daemon, handles one job, then exits.
Types ¶
type Executor ¶
type Executor interface { // Execute a provisioner that connects back to the remoteConnector. errCh // allows signaling of errors asynchronously and is closed on completion // with no error. Execute( ctx context.Context, provisionerType database.ProvisionerType, jobID, token, daemonCert, daemonAddress string) (errCh <-chan error) }
Executor is responsible for executing the remote provisioners.
TODO: this interface is where we will run Kubernetes Jobs in a future version; right now, only the unit tests implement this interface.
Click to show internal directories.
Click to hide internal directories.