runnerpb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RunnerService_GetJob_FullMethodName       = "/runkite.runner.v0.RunnerService/GetJob"
	RunnerService_StreamEvents_FullMethodName = "/runkite.runner.v0.RunnerService/StreamEvents"
	RunnerService_ReportStatus_FullMethodName = "/runkite.runner.v0.RunnerService/ReportStatus"
	RunnerService_WatchCancels_FullMethodName = "/runkite.runner.v0.RunnerService/WatchCancels"
	RunnerService_Heartbeat_FullMethodName    = "/runkite.runner.v0.RunnerService/Heartbeat"
)

Variables

View Source
var File_runner_proto protoreflect.FileDescriptor
View Source
var RunnerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "runkite.runner.v0.RunnerService",
	HandlerType: (*RunnerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetJob",
			Handler:    _RunnerService_GetJob_Handler,
		},
		{
			MethodName: "ReportStatus",
			Handler:    _RunnerService_ReportStatus_Handler,
		},
		{
			MethodName: "Heartbeat",
			Handler:    _RunnerService_Heartbeat_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamEvents",
			Handler:       _RunnerService_StreamEvents_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "WatchCancels",
			Handler:       _RunnerService_WatchCancels_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "runner.proto",
}

RunnerService_ServiceDesc is the grpc.ServiceDesc for RunnerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRunnerServiceServer

func RegisterRunnerServiceServer(s grpc.ServiceRegistrar, srv RunnerServiceServer)

Types

type CancelSignal

type CancelSignal struct {
	RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelSignal) Descriptor deprecated

func (*CancelSignal) Descriptor() ([]byte, []int)

Deprecated: Use CancelSignal.ProtoReflect.Descriptor instead.

func (*CancelSignal) GetRunId

func (x *CancelSignal) GetRunId() string

func (*CancelSignal) ProtoMessage

func (*CancelSignal) ProtoMessage()

func (*CancelSignal) ProtoReflect

func (x *CancelSignal) ProtoReflect() protoreflect.Message

func (*CancelSignal) Reset

func (x *CancelSignal) Reset()

func (*CancelSignal) String

func (x *CancelSignal) String() string

type GetJobRequest

type GetJobRequest struct {
	RunnerKind     string `protobuf:"bytes,1,opt,name=runner_kind,json=runnerKind,proto3" json:"runner_kind,omitempty"`
	TimeoutSeconds int32  `protobuf:"varint,2,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` // how long to wait for a job
	// contains filtered or unexported fields
}

func (*GetJobRequest) Descriptor deprecated

func (*GetJobRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.

func (*GetJobRequest) GetRunnerKind

func (x *GetJobRequest) GetRunnerKind() string

func (*GetJobRequest) GetTimeoutSeconds

func (x *GetJobRequest) GetTimeoutSeconds() int32

func (*GetJobRequest) ProtoMessage

func (*GetJobRequest) ProtoMessage()

func (*GetJobRequest) ProtoReflect

func (x *GetJobRequest) ProtoReflect() protoreflect.Message

func (*GetJobRequest) Reset

func (x *GetJobRequest) Reset()

func (*GetJobRequest) String

func (x *GetJobRequest) String() string

type GetJobResponse

type GetJobResponse struct {
	HasJob         bool   `protobuf:"varint,1,opt,name=has_job,json=hasJob,proto3" json:"has_job,omitempty"`
	AssignmentJson string `protobuf:"bytes,2,opt,name=assignment_json,json=assignmentJson,proto3" json:"assignment_json,omitempty"` // JSON-encoded RunAssignment
	// contains filtered or unexported fields
}

func (*GetJobResponse) Descriptor deprecated

func (*GetJobResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetJobResponse.ProtoReflect.Descriptor instead.

func (*GetJobResponse) GetAssignmentJson

func (x *GetJobResponse) GetAssignmentJson() string

func (*GetJobResponse) GetHasJob

func (x *GetJobResponse) GetHasJob() bool

func (*GetJobResponse) ProtoMessage

func (*GetJobResponse) ProtoMessage()

func (*GetJobResponse) ProtoReflect

func (x *GetJobResponse) ProtoReflect() protoreflect.Message

func (*GetJobResponse) Reset

func (x *GetJobResponse) Reset()

func (*GetJobResponse) String

func (x *GetJobResponse) String() string

type HeartbeatRequest

type HeartbeatRequest struct {
	RunId      string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	Generation int64  `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"` // see RunEventProto.generation
	// contains filtered or unexported fields
}

func (*HeartbeatRequest) Descriptor deprecated

func (*HeartbeatRequest) Descriptor() ([]byte, []int)

Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.

func (*HeartbeatRequest) GetGeneration

func (x *HeartbeatRequest) GetGeneration() int64

func (*HeartbeatRequest) GetRunId

func (x *HeartbeatRequest) GetRunId() string

func (*HeartbeatRequest) ProtoMessage

func (*HeartbeatRequest) ProtoMessage()

func (*HeartbeatRequest) ProtoReflect

func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message

func (*HeartbeatRequest) Reset

func (x *HeartbeatRequest) Reset()

func (*HeartbeatRequest) String

func (x *HeartbeatRequest) String() string

type HeartbeatResponse

type HeartbeatResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// superseded is true when this run's generation is no longer current
	// -- a newer attempt has already been dispatched (this runner was
	// reclaimed while it was still, genuinely, executing). Unlike
	// ReportStatusResponse.superseded, this arrives WHILE the runner is
	// still mid-execution (heartbeats fire every ~2s throughout a run,
	// not just once at the end) -- the runner should treat this exactly
	// like a self-triggered cancel: stop executing its graph and report
	// "interrupted" rather than continuing to burn resources on a run
	// that's already being retried elsewhere. Catching this at the NEXT
	// heartbeat tick, rather than only once the runner eventually
	// finishes and calls ReportStatus, is what makes an old runner
	// actually detect its own lease loss and stop.
	Superseded bool `protobuf:"varint,2,opt,name=superseded,proto3" json:"superseded,omitempty"`
	// contains filtered or unexported fields
}

func (*HeartbeatResponse) Descriptor deprecated

func (*HeartbeatResponse) Descriptor() ([]byte, []int)

Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.

func (*HeartbeatResponse) GetOk

func (x *HeartbeatResponse) GetOk() bool

func (*HeartbeatResponse) GetSuperseded

func (x *HeartbeatResponse) GetSuperseded() bool

func (*HeartbeatResponse) ProtoMessage

func (*HeartbeatResponse) ProtoMessage()

func (*HeartbeatResponse) ProtoReflect

func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message

func (*HeartbeatResponse) Reset

func (x *HeartbeatResponse) Reset()

func (*HeartbeatResponse) String

func (x *HeartbeatResponse) String() string

type ReportStatusRequest

type ReportStatusRequest struct {
	RunId        string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	Status       string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`                                 // "success", "error", "interrupted"
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // only if status == "error"
	Generation   int64  `protobuf:"varint,4,opt,name=generation,proto3" json:"generation,omitempty"`                        // see RunEventProto.generation
	// contains filtered or unexported fields
}

func (*ReportStatusRequest) Descriptor deprecated

func (*ReportStatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReportStatusRequest.ProtoReflect.Descriptor instead.

func (*ReportStatusRequest) GetErrorMessage

func (x *ReportStatusRequest) GetErrorMessage() string

func (*ReportStatusRequest) GetGeneration

func (x *ReportStatusRequest) GetGeneration() int64

func (*ReportStatusRequest) GetRunId

func (x *ReportStatusRequest) GetRunId() string

func (*ReportStatusRequest) GetStatus

func (x *ReportStatusRequest) GetStatus() string

func (*ReportStatusRequest) ProtoMessage

func (*ReportStatusRequest) ProtoMessage()

func (*ReportStatusRequest) ProtoReflect

func (x *ReportStatusRequest) ProtoReflect() protoreflect.Message

func (*ReportStatusRequest) Reset

func (x *ReportStatusRequest) Reset()

func (*ReportStatusRequest) String

func (x *ReportStatusRequest) String() string

type ReportStatusResponse

type ReportStatusResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// superseded is true when this report's generation was stale -- a
	// newer attempt (dispatched after this runner was reclaimed) already
	// owns the run, so the control plane ignored this report's status
	// entirely rather than risk overwriting the real outcome. The runner
	// has nothing further to do when this is true; it's informational
	// (log it), not something to retry.
	Superseded bool `protobuf:"varint,2,opt,name=superseded,proto3" json:"superseded,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportStatusResponse) Descriptor deprecated

func (*ReportStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReportStatusResponse.ProtoReflect.Descriptor instead.

func (*ReportStatusResponse) GetOk

func (x *ReportStatusResponse) GetOk() bool

func (*ReportStatusResponse) GetSuperseded

func (x *ReportStatusResponse) GetSuperseded() bool

func (*ReportStatusResponse) ProtoMessage

func (*ReportStatusResponse) ProtoMessage()

func (*ReportStatusResponse) ProtoReflect

func (x *ReportStatusResponse) ProtoReflect() protoreflect.Message

func (*ReportStatusResponse) Reset

func (x *ReportStatusResponse) Reset()

func (*ReportStatusResponse) String

func (x *ReportStatusResponse) String() string

type RunEventProto

type RunEventProto struct {
	RunId     string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	EventJson string `protobuf:"bytes,2,opt,name=event_json,json=eventJson,proto3" json:"event_json,omitempty"` // JSON-encoded RunEvent
	// generation is the attempt number this runner was handed in its
	// RunAssignment (see internal/transport/types.go's RunAssignment.Generation
	// doc comment for the full fencing rationale). The runner must echo
	// this exact value. Zero matches only a generation-zero assignment;
	// it never bypasses fencing or inherits the current generation.
	Generation int64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"`
	// contains filtered or unexported fields
}

func (*RunEventProto) Descriptor deprecated

func (*RunEventProto) Descriptor() ([]byte, []int)

Deprecated: Use RunEventProto.ProtoReflect.Descriptor instead.

func (*RunEventProto) GetEventJson

func (x *RunEventProto) GetEventJson() string

func (*RunEventProto) GetGeneration

func (x *RunEventProto) GetGeneration() int64

func (*RunEventProto) GetRunId

func (x *RunEventProto) GetRunId() string

func (*RunEventProto) ProtoMessage

func (*RunEventProto) ProtoMessage()

func (*RunEventProto) ProtoReflect

func (x *RunEventProto) ProtoReflect() protoreflect.Message

func (*RunEventProto) Reset

func (x *RunEventProto) Reset()

func (*RunEventProto) String

func (x *RunEventProto) String() string

type RunnerServiceClient

type RunnerServiceClient interface {
	// GetJob blocks until a job is available for the runner.
	// Runner calls this in a loop (long-poll pattern).
	GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error)
	// StreamEvents is called by the runner to stream events back
	// to the control plane for a specific run.
	StreamEvents(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[RunEventProto, StreamEventsResponse], error)
	// ReportStatus reports the final status of a run.
	ReportStatus(ctx context.Context, in *ReportStatusRequest, opts ...grpc.CallOption) (*ReportStatusResponse, error)
	// WatchCancels is a server-streaming RPC the runner calls to receive
	// cancel signals for runs it is executing. The runner sends its
	// runner_kind; the server streams CancelSignal messages whenever
	// a run of that kind is cancelled.
	WatchCancels(ctx context.Context, in *WatchCancelsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CancelSignal], error)
	// Heartbeat is called periodically by the runner while a run is
	// actively executing, to prove liveness for the WHOLE run, not just
	// delivery. Without this, the control plane only knows a job is alive
	// up to its first StreamEvents message (~15ms after dequeue in
	// practice) -- a runner crash any time after that left the run
	// permanently stuck, confirmed live. The server extends the same
	// in-flight lease Dequeue creates (see transport.JobQueue's Renew)
	// each time this arrives; a runner that stops heartbeating (crashed,
	// or an older runner that doesn't send this RPC at all) eventually
	// falls stale and gets reclaimed by the existing ReclaimStale reaper
	// -- no new reclaim mechanism needed, just a mechanism to keep
	// resetting the clock during real work.
	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
}

RunnerServiceClient is the client API for RunnerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

RunnerService is the gRPC service that runners implement. The control plane connects to runners (long-poll style) or runners connect to the control plane -- either way, this is the contract.

type RunnerServiceServer

type RunnerServiceServer interface {
	// GetJob blocks until a job is available for the runner.
	// Runner calls this in a loop (long-poll pattern).
	GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
	// StreamEvents is called by the runner to stream events back
	// to the control plane for a specific run.
	StreamEvents(grpc.ClientStreamingServer[RunEventProto, StreamEventsResponse]) error
	// ReportStatus reports the final status of a run.
	ReportStatus(context.Context, *ReportStatusRequest) (*ReportStatusResponse, error)
	// WatchCancels is a server-streaming RPC the runner calls to receive
	// cancel signals for runs it is executing. The runner sends its
	// runner_kind; the server streams CancelSignal messages whenever
	// a run of that kind is cancelled.
	WatchCancels(*WatchCancelsRequest, grpc.ServerStreamingServer[CancelSignal]) error
	// Heartbeat is called periodically by the runner while a run is
	// actively executing, to prove liveness for the WHOLE run, not just
	// delivery. Without this, the control plane only knows a job is alive
	// up to its first StreamEvents message (~15ms after dequeue in
	// practice) -- a runner crash any time after that left the run
	// permanently stuck, confirmed live. The server extends the same
	// in-flight lease Dequeue creates (see transport.JobQueue's Renew)
	// each time this arrives; a runner that stops heartbeating (crashed,
	// or an older runner that doesn't send this RPC at all) eventually
	// falls stale and gets reclaimed by the existing ReclaimStale reaper
	// -- no new reclaim mechanism needed, just a mechanism to keep
	// resetting the clock during real work.
	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
	// contains filtered or unexported methods
}

RunnerServiceServer is the server API for RunnerService service. All implementations must embed UnimplementedRunnerServiceServer for forward compatibility.

RunnerService is the gRPC service that runners implement. The control plane connects to runners (long-poll style) or runners connect to the control plane -- either way, this is the contract.

type RunnerService_StreamEventsClient

type RunnerService_StreamEventsClient = grpc.ClientStreamingClient[RunEventProto, StreamEventsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type RunnerService_StreamEventsServer

type RunnerService_StreamEventsServer = grpc.ClientStreamingServer[RunEventProto, StreamEventsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type RunnerService_WatchCancelsClient

type RunnerService_WatchCancelsClient = grpc.ServerStreamingClient[CancelSignal]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type RunnerService_WatchCancelsServer

type RunnerService_WatchCancelsServer = grpc.ServerStreamingServer[CancelSignal]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type StreamEventsResponse

type StreamEventsResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamEventsResponse) Descriptor deprecated

func (*StreamEventsResponse) Descriptor() ([]byte, []int)

Deprecated: Use StreamEventsResponse.ProtoReflect.Descriptor instead.

func (*StreamEventsResponse) GetOk

func (x *StreamEventsResponse) GetOk() bool

func (*StreamEventsResponse) ProtoMessage

func (*StreamEventsResponse) ProtoMessage()

func (*StreamEventsResponse) ProtoReflect

func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message

func (*StreamEventsResponse) Reset

func (x *StreamEventsResponse) Reset()

func (*StreamEventsResponse) String

func (x *StreamEventsResponse) String() string

type UnimplementedRunnerServiceServer

type UnimplementedRunnerServiceServer struct{}

UnimplementedRunnerServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedRunnerServiceServer) GetJob

func (UnimplementedRunnerServiceServer) Heartbeat

func (UnimplementedRunnerServiceServer) ReportStatus

func (UnimplementedRunnerServiceServer) WatchCancels

type UnsafeRunnerServiceServer

type UnsafeRunnerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRunnerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RunnerServiceServer will result in compilation errors.

type WatchCancelsRequest

type WatchCancelsRequest struct {
	RunnerKind string `protobuf:"bytes,1,opt,name=runner_kind,json=runnerKind,proto3" json:"runner_kind,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchCancelsRequest) Descriptor deprecated

func (*WatchCancelsRequest) Descriptor() ([]byte, []int)

Deprecated: Use WatchCancelsRequest.ProtoReflect.Descriptor instead.

func (*WatchCancelsRequest) GetRunnerKind

func (x *WatchCancelsRequest) GetRunnerKind() string

func (*WatchCancelsRequest) ProtoMessage

func (*WatchCancelsRequest) ProtoMessage()

func (*WatchCancelsRequest) ProtoReflect

func (x *WatchCancelsRequest) ProtoReflect() protoreflect.Message

func (*WatchCancelsRequest) Reset

func (x *WatchCancelsRequest) Reset()

func (*WatchCancelsRequest) String

func (x *WatchCancelsRequest) String() string

Jump to

Keyboard shortcuts

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