act_runner/client/client.go
Bo-Yi Wu 7d55fd57c9 chore(piepline): add runtime package.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:01 +08:00

16 lines
390 B
Go

package client
import (
"context"
v1 "gitea.com/gitea/proto/gen/proto/v1"
)
// 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
// Request requests the next available build stage for execution.
Request(ctx context.Context) (*v1.Stage, error)
}