runnerv1connect

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RunnerServiceName is the fully-qualified name of the RunnerService service.
	RunnerServiceName = "runner.v1.RunnerService"
)

Variables

This section is empty.

Functions

func NewRunnerServiceHandler

func NewRunnerServiceHandler(svc RunnerServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewRunnerServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type RunnerServiceClient

type RunnerServiceClient interface {
	// Register register a new runner in server.
	Register(context.Context, *connect_go.Request[v1.RegisterRequest]) (*connect_go.Response[v1.RegisterResponse], error)
	// FetchTask requests the next available task for execution.
	FetchTask(context.Context, *connect_go.Request[v1.FetchTaskRequest]) (*connect_go.Response[v1.FetchTaskResponse], error)
	// UpdateTask updates the task status.
	UpdateTask(context.Context, *connect_go.Request[v1.UpdateTaskRequest]) (*connect_go.Response[v1.UpdateTaskResponse], error)
	// UpdateLog uploads log of the task.
	UpdateLog(context.Context, *connect_go.Request[v1.UpdateLogRequest]) (*connect_go.Response[v1.UpdateLogResponse], error)
}

RunnerServiceClient is a client for the runner.v1.RunnerService service.

func NewRunnerServiceClient

func NewRunnerServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RunnerServiceClient

NewRunnerServiceClient constructs a client for the runner.v1.RunnerService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type RunnerServiceHandler

type RunnerServiceHandler interface {
	// Register register a new runner in server.
	Register(context.Context, *connect_go.Request[v1.RegisterRequest]) (*connect_go.Response[v1.RegisterResponse], error)
	// FetchTask requests the next available task for execution.
	FetchTask(context.Context, *connect_go.Request[v1.FetchTaskRequest]) (*connect_go.Response[v1.FetchTaskResponse], error)
	// UpdateTask updates the task status.
	UpdateTask(context.Context, *connect_go.Request[v1.UpdateTaskRequest]) (*connect_go.Response[v1.UpdateTaskResponse], error)
	// UpdateLog uploads log of the task.
	UpdateLog(context.Context, *connect_go.Request[v1.UpdateLogRequest]) (*connect_go.Response[v1.UpdateLogResponse], error)
}

RunnerServiceHandler is an implementation of the runner.v1.RunnerService service.

type UnimplementedRunnerServiceHandler

type UnimplementedRunnerServiceHandler struct{}

UnimplementedRunnerServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL