mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 06:44:23 +01:00
228 lines
7.9 KiB
Go
228 lines
7.9 KiB
Go
//
|
|
// Copyright 2019 HyperHQ Inc.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc v3.21.12
|
|
// source: cache.proto
|
|
|
|
package __
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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
|
|
|
|
const (
|
|
CacheService_Config_FullMethodName = "/cache.CacheService/Config"
|
|
CacheService_GetBaseVM_FullMethodName = "/cache.CacheService/GetBaseVM"
|
|
CacheService_Status_FullMethodName = "/cache.CacheService/Status"
|
|
CacheService_Quit_FullMethodName = "/cache.CacheService/Quit"
|
|
)
|
|
|
|
// CacheServiceClient is the client API for CacheService 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 CacheServiceClient interface {
|
|
Config(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcVMConfig, error)
|
|
GetBaseVM(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcVM, error)
|
|
Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcStatus, error)
|
|
Quit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
}
|
|
|
|
type cacheServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient {
|
|
return &cacheServiceClient{cc}
|
|
}
|
|
|
|
func (c *cacheServiceClient) Config(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcVMConfig, error) {
|
|
out := new(GrpcVMConfig)
|
|
err := c.cc.Invoke(ctx, CacheService_Config_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cacheServiceClient) GetBaseVM(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcVM, error) {
|
|
out := new(GrpcVM)
|
|
err := c.cc.Invoke(ctx, CacheService_GetBaseVM_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cacheServiceClient) Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GrpcStatus, error) {
|
|
out := new(GrpcStatus)
|
|
err := c.cc.Invoke(ctx, CacheService_Status_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cacheServiceClient) Quit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, CacheService_Quit_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CacheServiceServer is the server API for CacheService service.
|
|
// All implementations must embed UnimplementedCacheServiceServer
|
|
// for forward compatibility
|
|
type CacheServiceServer interface {
|
|
Config(context.Context, *emptypb.Empty) (*GrpcVMConfig, error)
|
|
GetBaseVM(context.Context, *emptypb.Empty) (*GrpcVM, error)
|
|
Status(context.Context, *emptypb.Empty) (*GrpcStatus, error)
|
|
Quit(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
|
mustEmbedUnimplementedCacheServiceServer()
|
|
}
|
|
|
|
// UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedCacheServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedCacheServiceServer) Config(context.Context, *emptypb.Empty) (*GrpcVMConfig, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Config not implemented")
|
|
}
|
|
func (UnimplementedCacheServiceServer) GetBaseVM(context.Context, *emptypb.Empty) (*GrpcVM, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBaseVM not implemented")
|
|
}
|
|
func (UnimplementedCacheServiceServer) Status(context.Context, *emptypb.Empty) (*GrpcStatus, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
|
|
}
|
|
func (UnimplementedCacheServiceServer) Quit(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Quit not implemented")
|
|
}
|
|
func (UnimplementedCacheServiceServer) mustEmbedUnimplementedCacheServiceServer() {}
|
|
|
|
// UnsafeCacheServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CacheServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeCacheServiceServer interface {
|
|
mustEmbedUnimplementedCacheServiceServer()
|
|
}
|
|
|
|
func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer) {
|
|
s.RegisterService(&CacheService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _CacheService_Config_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CacheServiceServer).Config(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CacheService_Config_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CacheServiceServer).Config(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CacheService_GetBaseVM_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CacheServiceServer).GetBaseVM(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CacheService_GetBaseVM_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CacheServiceServer).GetBaseVM(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CacheService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CacheServiceServer).Status(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CacheService_Status_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CacheServiceServer).Status(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CacheService_Quit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CacheServiceServer).Quit(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CacheService_Quit_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CacheServiceServer).Quit(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var CacheService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "cache.CacheService",
|
|
HandlerType: (*CacheServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Config",
|
|
Handler: _CacheService_Config_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetBaseVM",
|
|
Handler: _CacheService_GetBaseVM_Handler,
|
|
},
|
|
{
|
|
MethodName: "Status",
|
|
Handler: _CacheService_Status_Handler,
|
|
},
|
|
{
|
|
MethodName: "Quit",
|
|
Handler: _CacheService_Quit_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "cache.proto",
|
|
}
|