/**
 * Register information on a specific network agent.
 */
import type { RedisClient } from 'bun';
import type { TClientId, TNetworkId_S } from '@flux/shared/types';
export declare class NetworkAgentRedis {
    private readonly client;
    private readonly cashedDataUsage;
    constructor(client: RedisClient);
    /**
     * Registers a network agent in the sorted set.
     *
     * @param { TNetworkId_S } networkId - The network ID
     * @param { TAddress } address - The client address
     * @param { TClientId } clientId - The socket ID
     * @param { TAgentOwnUId } uid - The agent UID
     *
     * @returns { Promise<void> }
    public async registerNetworkAgent(
        networkId: TNetworkId_S,
        address: TAddress,
        clientId: TClientId,
        uid: TAgentOwnUId,
    ): Promise<void> {
        const key: string = `networks/${networkId}/agents/${clientId}`;

        await this.client.hset(key, {
            'data-usage': '0',
            'address': address,
            'name': uid,
            'registerAt': new Date().toISOString(),
        });

        await this.client.expire(key, 500);

        await this.networkAgentRedisSortedSet
            .registerAgent(
                networkId,
                clientId,
            );
    }
     */
    /**
     * Caches the data usage for a network agent to be pushed periodically.
     *
     * @param { TNetworkId_S } networkId - The network ID
     * @param { TClientId } clientId - The socket ID
     * @param { number } usage - The data usage in bytes
     */
    registerDataUsage(networkId: TNetworkId_S, clientId: TClientId, usage: number): void;
    /**
     * Pushes the data usage to the Redis server.
     *
     * @returns { Promise<void> }
     */
    private pushDataUsage;
}
