// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.15.8
// source: admin.proto

package types

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

const (
	AdminRPCService_MempoolTxStat_FullMethodName = "/types.AdminRPCService/MempoolTxStat"
	AdminRPCService_MempoolTx_FullMethodName     = "/types.AdminRPCService/MempoolTx"
)

// AdminRPCServiceClient is the client API for AdminRPCService 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 AdminRPCServiceClient interface {
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTxStat(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SingleBytes, error)
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTx(ctx context.Context, in *AccountList, opts ...grpc.CallOption) (*SingleBytes, error)
}

type adminRPCServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAdminRPCServiceClient(cc grpc.ClientConnInterface) AdminRPCServiceClient {
	return &adminRPCServiceClient{cc}
}

func (c *adminRPCServiceClient) MempoolTxStat(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SingleBytes, error) {
	out := new(SingleBytes)
	err := c.cc.Invoke(ctx, AdminRPCService_MempoolTxStat_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *adminRPCServiceClient) MempoolTx(ctx context.Context, in *AccountList, opts ...grpc.CallOption) (*SingleBytes, error) {
	out := new(SingleBytes)
	err := c.cc.Invoke(ctx, AdminRPCService_MempoolTx_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AdminRPCServiceServer is the server API for AdminRPCService service.
// All implementations must embed UnimplementedAdminRPCServiceServer
// for forward compatibility
type AdminRPCServiceServer interface {
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTxStat(context.Context, *Empty) (*SingleBytes, error)
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTx(context.Context, *AccountList) (*SingleBytes, error)
	mustEmbedUnimplementedAdminRPCServiceServer()
}

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

func (UnimplementedAdminRPCServiceServer) MempoolTxStat(context.Context, *Empty) (*SingleBytes, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MempoolTxStat not implemented")
}
func (UnimplementedAdminRPCServiceServer) MempoolTx(context.Context, *AccountList) (*SingleBytes, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MempoolTx not implemented")
}
func (UnimplementedAdminRPCServiceServer) mustEmbedUnimplementedAdminRPCServiceServer() {}

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

func RegisterAdminRPCServiceServer(s grpc.ServiceRegistrar, srv AdminRPCServiceServer) {
	s.RegisterService(&AdminRPCService_ServiceDesc, srv)
}

func _AdminRPCService_MempoolTxStat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AdminRPCServiceServer).MempoolTxStat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AdminRPCService_MempoolTxStat_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AdminRPCServiceServer).MempoolTxStat(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _AdminRPCService_MempoolTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AccountList)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AdminRPCServiceServer).MempoolTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AdminRPCService_MempoolTx_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AdminRPCServiceServer).MempoolTx(ctx, req.(*AccountList))
	}
	return interceptor(ctx, in, info, handler)
}

// AdminRPCService_ServiceDesc is the grpc.ServiceDesc for AdminRPCService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AdminRPCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "types.AdminRPCService",
	HandlerType: (*AdminRPCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MempoolTxStat",
			Handler:    _AdminRPCService_MempoolTxStat_Handler,
		},
		{
			MethodName: "MempoolTx",
			Handler:    _AdminRPCService_MempoolTx_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin.proto",
}
