feat(cli): make register interactive stages working

This commit is contained in:
fuxiaohei
2022-11-15 22:42:41 +08:00
committed by Jason Song
parent 8f9d7506dc
commit bfcc6f56f3
8 changed files with 132 additions and 84 deletions

View File

@ -15,4 +15,5 @@ type Filter struct {
type Client interface {
pingv1connect.PingServiceClient
runnerv1connect.RunnerServiceClient
Address() string
}

View File

@ -62,13 +62,19 @@ func New(endpoint string, opts ...Option) *HTTPClient {
endpoint,
cfg.opts...,
),
endpoint: endpoint,
}
}
func (c *HTTPClient) Address() string {
return c.endpoint
}
var _ Client = (*HTTPClient)(nil)
// An HTTPClient manages communication with the runner API.
type HTTPClient struct {
pingv1connect.PingServiceClient
runnerv1connect.RunnerServiceClient
endpoint string
}