worker

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfig = `` /* 1703-byte string literal not displayed */
View Source
const ServiceTag = "svc-pg-worker"

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHConnector added in v0.3.0

type SSHConnector struct {
	Credentials []*ent.Credential
	// contains filtered or unexported fields
}

SSHConnector is used to establish ssh connections for the worker's task execution environment.

func (*SSHConnector) Close added in v0.3.0

func (conn *SSHConnector) Close() error

func (*SSHConnector) Connect added in v0.3.0

func (conn *SSHConnector) Connect(host string, filter func([]ssh.ClientConfig) []ssh.ClientConfig) (*ssh.Client, error)

type Worker

type Worker struct {
	cdn.Uploader
	cdn.Downloader
	Graph  graphql.Client
	Config string
}

func (*Worker) ExecTargetTask

func (w *Worker) ExecTargetTask(ctx context.Context, task *ent.Task, target *ent.Target, credentials []*ent.Credential)

func (*Worker) HandleTaskQueued

func (w *Worker) HandleTaskQueued(ctx context.Context, info event.TaskQueued)

Jump to

Keyboard shortcuts

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