mirror of
https://gitea.com/gitea/act_runner.git
synced 2024-11-10 12:47:22 +01:00
449388f3ab
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
25 lines
579 B
Go
25 lines
579 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
|
)
|
|
|
|
type Filter struct {
|
|
Kind string `json:"kind"`
|
|
Type string `json:"type"`
|
|
OS string `json:"os"`
|
|
Arch string `json:"arch"`
|
|
Capacity int `json:"capacity"`
|
|
}
|
|
|
|
// 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
|
|
|
|
// Register for new runner.
|
|
Register(ctx context.Context, args *runnerv1.RegisterRequest) (*runnerv1.Runner, error)
|
|
}
|