2022-08-13 22:41:01 +08:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-08-14 13:29:00 +08:00
|
|
|
|
2022-08-17 14:25:14 +08:00
|
|
|
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
2022-08-13 22:41:01 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// A Client manages communication with the runner.
|
|
|
|
type Client interface {
|
|
|
|
// Ping sends a ping message to the server to test connectivity.
|
|
|
|
Ping(ctx context.Context, machine string) error
|
2022-08-14 13:29:00 +08:00
|
|
|
|
|
|
|
// Request requests the next available build stage for execution.
|
2022-08-17 14:25:14 +08:00
|
|
|
Request(ctx context.Context) (*runnerv1.Stage, error)
|
2022-08-13 22:41:01 +08:00
|
|
|
}
|