Documentation
¶
Overview ¶
package basic implements a low-level client for the step-runner gRPC service with a (more or less) 1:1 mapping to the raw gRPC API. It abstracts all proto types except for StepResult. Use this API if you want full control over every stage of running, following and closing a job.
Index ¶
- type StepResultWriter
- type StepRunnerClient
- func (c *StepRunnerClient) Close(ctx context.Context, jobID string) error
- func (c *StepRunnerClient) FollowLogs(ctx context.Context, jobID string, offset int64, writer io.Writer) (int64, error)
- func (c *StepRunnerClient) ListJobs(ctx context.Context) ([]client.Status, error)
- func (c *StepRunnerClient) Run(ctx context.Context, runRequest *client.RunRequest) error
- func (c *StepRunnerClient) Status(ctx context.Context, jobID string) (client.Status, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StepResultWriter ¶
type StepResultWriter interface {
Write(*proto.StepResult) error
}
type StepRunnerClient ¶
type StepRunnerClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(conn *grpc.ClientConn) *StepRunnerClient
func (*StepRunnerClient) Close ¶
func (c *StepRunnerClient) Close(ctx context.Context, jobID string) error
Close cancelled (if running) the specified job-id, and frees all resources associated with the job.
func (*StepRunnerClient) FollowLogs ¶
func (c *StepRunnerClient) FollowLogs(ctx context.Context, jobID string, offset int64, writer io.Writer) (int64, error)
FollowLogs streams logs emitted by the specified job to the specified io.Writer.
func (*StepRunnerClient) ListJobs ¶
ListJobs returns the Status for all jobs running on the connected step-runner service.
func (*StepRunnerClient) Run ¶
func (c *StepRunnerClient) Run(ctx context.Context, runRequest *client.RunRequest) error
Run initiates the job defined in runRequest on the connected step-runner service.