// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.21.3
// source: meta.proto

package meta

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

// MetaRouteClient is the client API for MetaRoute 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 MetaRouteClient interface {
	RegisterMetaInfo(ctx context.Context, in *MetaInfo, opts ...grpc.CallOption) (*MetaResponse, error)
	HeartBeat(ctx context.Context, in *MetaInfo, opts ...grpc.CallOption) (*MetaResponse, error)
}

type metaRouteClient struct {
	cc grpc.ClientConnInterface
}

func NewMetaRouteClient(cc grpc.ClientConnInterface) MetaRouteClient {
	return &metaRouteClient{cc}
}

func (c *metaRouteClient) RegisterMetaInfo(ctx context.Context, in *MetaInfo, opts ...grpc.CallOption) (*MetaResponse, error) {
	out := new(MetaResponse)
	err := c.cc.Invoke(ctx, "/grpcMeta.MetaRoute/RegisterMetaInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *metaRouteClient) HeartBeat(ctx context.Context, in *MetaInfo, opts ...grpc.CallOption) (*MetaResponse, error) {
	out := new(MetaResponse)
	err := c.cc.Invoke(ctx, "/grpcMeta.MetaRoute/HeartBeat", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MetaRouteServer is the server API for MetaRoute service.
// All implementations must embed UnimplementedMetaRouteServer
// for forward compatibility
type MetaRouteServer interface {
	RegisterMetaInfo(context.Context, *MetaInfo) (*MetaResponse, error)
	HeartBeat(context.Context, *MetaInfo) (*MetaResponse, error)
	mustEmbedUnimplementedMetaRouteServer()
}

// UnimplementedMetaRouteServer must be embedded to have forward compatible implementations.
type UnimplementedMetaRouteServer struct {
}

func (UnimplementedMetaRouteServer) RegisterMetaInfo(context.Context, *MetaInfo) (*MetaResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegisterMetaInfo not implemented")
}
func (UnimplementedMetaRouteServer) HeartBeat(context.Context, *MetaInfo) (*MetaResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HeartBeat not implemented")
}
func (UnimplementedMetaRouteServer) mustEmbedUnimplementedMetaRouteServer() {}

// UnsafeMetaRouteServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MetaRouteServer will
// result in compilation errors.
type UnsafeMetaRouteServer interface {
	mustEmbedUnimplementedMetaRouteServer()
}

func RegisterMetaRouteServer(s grpc.ServiceRegistrar, srv MetaRouteServer) {
	s.RegisterService(&MetaRoute_ServiceDesc, srv)
}

func _MetaRoute_RegisterMetaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MetaInfo)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MetaRouteServer).RegisterMetaInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcMeta.MetaRoute/RegisterMetaInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MetaRouteServer).RegisterMetaInfo(ctx, req.(*MetaInfo))
	}
	return interceptor(ctx, in, info, handler)
}

func _MetaRoute_HeartBeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MetaInfo)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MetaRouteServer).HeartBeat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcMeta.MetaRoute/HeartBeat",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MetaRouteServer).HeartBeat(ctx, req.(*MetaInfo))
	}
	return interceptor(ctx, in, info, handler)
}

// MetaRoute_ServiceDesc is the grpc.ServiceDesc for MetaRoute service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MetaRoute_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpcMeta.MetaRoute",
	HandlerType: (*MetaRouteServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterMetaInfo",
			Handler:    _MetaRoute_RegisterMetaInfo_Handler,
		},
		{
			MethodName: "HeartBeat",
			Handler:    _MetaRoute_HeartBeat_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "meta.proto",
}
