2026-03-13 20:40:20 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2026-05-12 01:28:18 +08:00
// - protoc-gen-go-grpc v1.6.1
// - protoc v7.34.1
2026-03-13 20:40:20 +08:00
// source: proto/runner/runner.proto
package runner
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2026-05-12 01:28:18 +08:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2026-03-13 20:40:20 +08:00
const (
RunnerHub_Connect_FullMethodName = "/runner.RunnerHub/Connect"
)
// RunnerHubClient is the client API for RunnerHub 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.
2026-05-12 01:28:18 +08:00
//
// RunnerHub 服务 - 由 Backend 服务器实现
// Runner 作为客户端主动连接,建立双向流通信
2026-03-13 20:40:20 +08:00
type RunnerHubClient interface {
// Connect 建立双向流连接
// Runner 通过此连接注册、接收任务、返回结果
2026-05-12 01:28:18 +08:00
Connect ( ctx context . Context , opts ... grpc . CallOption ) ( grpc . BidiStreamingClient [ StreamMessage , StreamMessage ] , error )
2026-03-13 20:40:20 +08:00
}
type runnerHubClient struct {
cc grpc . ClientConnInterface
}
func NewRunnerHubClient ( cc grpc . ClientConnInterface ) RunnerHubClient {
return & runnerHubClient { cc }
}
2026-05-12 01:28:18 +08:00
func ( c * runnerHubClient ) Connect ( ctx context . Context , opts ... grpc . CallOption ) ( grpc . BidiStreamingClient [ StreamMessage , StreamMessage ] , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
stream , err := c . cc . NewStream ( ctx , & RunnerHub_ServiceDesc . Streams [ 0 ] , RunnerHub_Connect_FullMethodName , cOpts ... )
2026-03-13 20:40:20 +08:00
if err != nil {
return nil , err
}
2026-05-12 01:28:18 +08:00
x := & grpc . GenericClientStream [ StreamMessage , StreamMessage ] { ClientStream : stream }
2026-03-13 20:40:20 +08:00
return x , nil
}
2026-05-12 01:28:18 +08:00
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RunnerHub_ConnectClient = grpc . BidiStreamingClient [ StreamMessage , StreamMessage ]
2026-03-13 20:40:20 +08:00
// RunnerHubServer is the server API for RunnerHub service.
// All implementations must embed UnimplementedRunnerHubServer
2026-05-12 01:28:18 +08:00
// for forward compatibility.
//
// RunnerHub 服务 - 由 Backend 服务器实现
// Runner 作为客户端主动连接,建立双向流通信
2026-03-13 20:40:20 +08:00
type RunnerHubServer interface {
// Connect 建立双向流连接
// Runner 通过此连接注册、接收任务、返回结果
2026-05-12 01:28:18 +08:00
Connect ( grpc . BidiStreamingServer [ StreamMessage , StreamMessage ] ) error
2026-03-13 20:40:20 +08:00
mustEmbedUnimplementedRunnerHubServer ( )
}
2026-05-12 01:28:18 +08:00
// UnimplementedRunnerHubServer 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.
type UnimplementedRunnerHubServer struct { }
2026-03-13 20:40:20 +08:00
2026-05-12 01:28:18 +08:00
func ( UnimplementedRunnerHubServer ) Connect ( grpc . BidiStreamingServer [ StreamMessage , StreamMessage ] ) error {
return status . Error ( codes . Unimplemented , "method Connect not implemented" )
2026-03-13 20:40:20 +08:00
}
func ( UnimplementedRunnerHubServer ) mustEmbedUnimplementedRunnerHubServer ( ) { }
2026-05-12 01:28:18 +08:00
func ( UnimplementedRunnerHubServer ) testEmbeddedByValue ( ) { }
2026-03-13 20:40:20 +08:00
// UnsafeRunnerHubServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RunnerHubServer will
// result in compilation errors.
type UnsafeRunnerHubServer interface {
mustEmbedUnimplementedRunnerHubServer ( )
}
func RegisterRunnerHubServer ( s grpc . ServiceRegistrar , srv RunnerHubServer ) {
2026-05-12 01:28:18 +08:00
// If the following call panics, it indicates UnimplementedRunnerHubServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
2026-03-13 20:40:20 +08:00
s . RegisterService ( & RunnerHub_ServiceDesc , srv )
}
func _RunnerHub_Connect_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2026-05-12 01:28:18 +08:00
return srv . ( RunnerHubServer ) . Connect ( & grpc . GenericServerStream [ StreamMessage , StreamMessage ] { ServerStream : stream } )
2026-03-13 20:40:20 +08:00
}
2026-05-12 01:28:18 +08:00
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RunnerHub_ConnectServer = grpc . BidiStreamingServer [ StreamMessage , StreamMessage ]
2026-03-13 20:40:20 +08:00
// RunnerHub_ServiceDesc is the grpc.ServiceDesc for RunnerHub service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RunnerHub_ServiceDesc = grpc . ServiceDesc {
ServiceName : "runner.RunnerHub" ,
HandlerType : ( * RunnerHubServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc { } ,
Streams : [ ] grpc . StreamDesc {
{
StreamName : "Connect" ,
Handler : _RunnerHub_Connect_Handler ,
ServerStreams : true ,
ClientStreams : true ,
} ,
} ,
Metadata : "proto/runner/runner.proto" ,
}