constellation/debugd/service/debugd_grpc.pb.go

276 lines
9.3 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: debugd.proto
package service
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.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DebugdClient is the client API for Debugd 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.
type DebugdClient interface {
UploadAuthorizedKeys(ctx context.Context, in *UploadAuthorizedKeysRequest, opts ...grpc.CallOption) (*UploadAuthorizedKeysResponse, error)
UploadCoordinator(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadCoordinatorClient, error)
DownloadCoordinator(ctx context.Context, in *DownloadCoordinatorRequest, opts ...grpc.CallOption) (Debugd_DownloadCoordinatorClient, error)
UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error)
}
type debugdClient struct {
cc grpc.ClientConnInterface
}
func NewDebugdClient(cc grpc.ClientConnInterface) DebugdClient {
return &debugdClient{cc}
}
func (c *debugdClient) UploadAuthorizedKeys(ctx context.Context, in *UploadAuthorizedKeysRequest, opts ...grpc.CallOption) (*UploadAuthorizedKeysResponse, error) {
out := new(UploadAuthorizedKeysResponse)
err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadAuthorizedKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *debugdClient) UploadCoordinator(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadCoordinatorClient, error) {
stream, err := c.cc.NewStream(ctx, &Debugd_ServiceDesc.Streams[0], "/debugd.Debugd/UploadCoordinator", opts...)
if err != nil {
return nil, err
}
x := &debugdUploadCoordinatorClient{stream}
return x, nil
}
type Debugd_UploadCoordinatorClient interface {
Send(*Chunk) error
CloseAndRecv() (*UploadCoordinatorResponse, error)
grpc.ClientStream
}
type debugdUploadCoordinatorClient struct {
grpc.ClientStream
}
func (x *debugdUploadCoordinatorClient) Send(m *Chunk) error {
return x.ClientStream.SendMsg(m)
}
func (x *debugdUploadCoordinatorClient) CloseAndRecv() (*UploadCoordinatorResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(UploadCoordinatorResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *debugdClient) DownloadCoordinator(ctx context.Context, in *DownloadCoordinatorRequest, opts ...grpc.CallOption) (Debugd_DownloadCoordinatorClient, error) {
stream, err := c.cc.NewStream(ctx, &Debugd_ServiceDesc.Streams[1], "/debugd.Debugd/DownloadCoordinator", opts...)
if err != nil {
return nil, err
}
x := &debugdDownloadCoordinatorClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Debugd_DownloadCoordinatorClient interface {
Recv() (*Chunk, error)
grpc.ClientStream
}
type debugdDownloadCoordinatorClient struct {
grpc.ClientStream
}
func (x *debugdDownloadCoordinatorClient) Recv() (*Chunk, error) {
m := new(Chunk)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *debugdClient) UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) {
out := new(UploadSystemdServiceUnitsResponse)
err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadSystemServiceUnits", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DebugdServer is the server API for Debugd service.
// All implementations must embed UnimplementedDebugdServer
// for forward compatibility
type DebugdServer interface {
UploadAuthorizedKeys(context.Context, *UploadAuthorizedKeysRequest) (*UploadAuthorizedKeysResponse, error)
UploadCoordinator(Debugd_UploadCoordinatorServer) error
DownloadCoordinator(*DownloadCoordinatorRequest, Debugd_DownloadCoordinatorServer) error
UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error)
mustEmbedUnimplementedDebugdServer()
}
// UnimplementedDebugdServer must be embedded to have forward compatible implementations.
type UnimplementedDebugdServer struct {
}
func (UnimplementedDebugdServer) UploadAuthorizedKeys(context.Context, *UploadAuthorizedKeysRequest) (*UploadAuthorizedKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UploadAuthorizedKeys not implemented")
}
func (UnimplementedDebugdServer) UploadCoordinator(Debugd_UploadCoordinatorServer) error {
return status.Errorf(codes.Unimplemented, "method UploadCoordinator not implemented")
}
func (UnimplementedDebugdServer) DownloadCoordinator(*DownloadCoordinatorRequest, Debugd_DownloadCoordinatorServer) error {
return status.Errorf(codes.Unimplemented, "method DownloadCoordinator not implemented")
}
func (UnimplementedDebugdServer) UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UploadSystemServiceUnits not implemented")
}
func (UnimplementedDebugdServer) mustEmbedUnimplementedDebugdServer() {}
// UnsafeDebugdServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DebugdServer will
// result in compilation errors.
type UnsafeDebugdServer interface {
mustEmbedUnimplementedDebugdServer()
}
func RegisterDebugdServer(s grpc.ServiceRegistrar, srv DebugdServer) {
s.RegisterService(&Debugd_ServiceDesc, srv)
}
func _Debugd_UploadAuthorizedKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UploadAuthorizedKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DebugdServer).UploadAuthorizedKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/debugd.Debugd/UploadAuthorizedKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DebugdServer).UploadAuthorizedKeys(ctx, req.(*UploadAuthorizedKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Debugd_UploadCoordinator_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DebugdServer).UploadCoordinator(&debugdUploadCoordinatorServer{stream})
}
type Debugd_UploadCoordinatorServer interface {
SendAndClose(*UploadCoordinatorResponse) error
Recv() (*Chunk, error)
grpc.ServerStream
}
type debugdUploadCoordinatorServer struct {
grpc.ServerStream
}
func (x *debugdUploadCoordinatorServer) SendAndClose(m *UploadCoordinatorResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *debugdUploadCoordinatorServer) Recv() (*Chunk, error) {
m := new(Chunk)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Debugd_DownloadCoordinator_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DownloadCoordinatorRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DebugdServer).DownloadCoordinator(m, &debugdDownloadCoordinatorServer{stream})
}
type Debugd_DownloadCoordinatorServer interface {
Send(*Chunk) error
grpc.ServerStream
}
type debugdDownloadCoordinatorServer struct {
grpc.ServerStream
}
func (x *debugdDownloadCoordinatorServer) Send(m *Chunk) error {
return x.ServerStream.SendMsg(m)
}
func _Debugd_UploadSystemServiceUnits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UploadSystemdServiceUnitsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DebugdServer).UploadSystemServiceUnits(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/debugd.Debugd/UploadSystemServiceUnits",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DebugdServer).UploadSystemServiceUnits(ctx, req.(*UploadSystemdServiceUnitsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Debugd_ServiceDesc is the grpc.ServiceDesc for Debugd service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Debugd_ServiceDesc = grpc.ServiceDesc{
ServiceName: "debugd.Debugd",
HandlerType: (*DebugdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UploadAuthorizedKeys",
Handler: _Debugd_UploadAuthorizedKeys_Handler,
},
{
MethodName: "UploadSystemServiceUnits",
Handler: _Debugd_UploadSystemServiceUnits_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "UploadCoordinator",
Handler: _Debugd_UploadCoordinator_Handler,
ClientStreams: true,
},
{
StreamName: "DownloadCoordinator",
Handler: _Debugd_DownloadCoordinator_Handler,
ServerStreams: true,
},
},
Metadata: "debugd.proto",
}