2022-08-13 14:41:01 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-08-14 05:29:00 +00:00
|
|
|
|
2022-08-17 06:25:14 +00:00
|
|
|
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
2022-08-13 14:41:01 +00:00
|
|
|
)
|
|
|
|
|
2022-08-28 06:05:56 +00:00
|
|
|
type Filter struct {
|
|
|
|
Kind string `json:"kind"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
OS string `json:"os"`
|
|
|
|
Arch string `json:"arch"`
|
|
|
|
Capacity int `json:"capacity"`
|
|
|
|
}
|
|
|
|
|
2022-08-13 14:41:01 +00: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 05:29:00 +00:00
|
|
|
|
2022-08-28 06:05:56 +00:00
|
|
|
// Register for new runner.
|
|
|
|
Register(ctx context.Context, args *runnerv1.RegisterRequest) (*runnerv1.Runner, error)
|
2022-08-13 14:41:01 +00:00
|
|
|
}
|