142 lines
4.5 KiB
Go
142 lines
4.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.15.8
|
|
// source: ingress.proto
|
|
|
|
package proto
|
|
|
|
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
|
|
|
|
// IngressClient is the client API for Ingress 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 IngressClient interface {
|
|
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
|
|
Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetReply, error)
|
|
}
|
|
|
|
type ingressClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewIngressClient(cc grpc.ClientConnInterface) IngressClient {
|
|
return &ingressClient{cc}
|
|
}
|
|
|
|
func (c *ingressClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) {
|
|
out := new(GetReply)
|
|
err := c.cc.Invoke(ctx, "/proto.Ingress/Get", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ingressClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetReply, error) {
|
|
out := new(SetReply)
|
|
err := c.cc.Invoke(ctx, "/proto.Ingress/Set", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// IngressServer is the server API for Ingress service.
|
|
// All implementations must embed UnimplementedIngressServer
|
|
// for forward compatibility
|
|
type IngressServer interface {
|
|
Get(context.Context, *GetRequest) (*GetReply, error)
|
|
Set(context.Context, *SetRequest) (*SetReply, error)
|
|
mustEmbedUnimplementedIngressServer()
|
|
}
|
|
|
|
// UnimplementedIngressServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedIngressServer struct {
|
|
}
|
|
|
|
func (UnimplementedIngressServer) Get(context.Context, *GetRequest) (*GetReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
|
}
|
|
func (UnimplementedIngressServer) Set(context.Context, *SetRequest) (*SetReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
|
|
}
|
|
func (UnimplementedIngressServer) mustEmbedUnimplementedIngressServer() {}
|
|
|
|
// UnsafeIngressServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to IngressServer will
|
|
// result in compilation errors.
|
|
type UnsafeIngressServer interface {
|
|
mustEmbedUnimplementedIngressServer()
|
|
}
|
|
|
|
func RegisterIngressServer(s grpc.ServiceRegistrar, srv IngressServer) {
|
|
s.RegisterService(&Ingress_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Ingress_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(IngressServer).Get(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Ingress/Get",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(IngressServer).Get(ctx, req.(*GetRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Ingress_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(IngressServer).Set(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Ingress/Set",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(IngressServer).Set(ctx, req.(*SetRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Ingress_ServiceDesc is the grpc.ServiceDesc for Ingress service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Ingress_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.Ingress",
|
|
HandlerType: (*IngressServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Get",
|
|
Handler: _Ingress_Get_Handler,
|
|
},
|
|
{
|
|
MethodName: "Set",
|
|
Handler: _Ingress_Set_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "ingress.proto",
|
|
}
|