Giter VIP home page Giter VIP logo

aggregator's Issues

Feature: passing an array to $input

Hi again, very handy stuff you have, thanks!

I'm wondering if it would be possible to have the $input figure out if it's a simple pass of plain data or an array. To give you some context we have a program that writes out a flat file with a series of prefixes of varying lengths, both v4/v6. Right now when we pass the data we do it this way:

 if (($addresses = file($routefile)) == FALSE)
  {
    status(STATUS_WARNING, "Unable to open route file (might be empty), skipping.");
    return FALSE;
  }

  // First normalize the routes, no array.
  $addresses_normal = implode("", $addresses);

  // Process the aggregation
  $addresses_agg = aggregate($addresses_normal);

  // Return them in an array
  return explode(" ", $addresses_agg);

I'm wondering if it's possible to add the ability to detect if an array is being passed and do the magic within the Input?

Hacktoberfest 2017

Hacktoberfest by Digital Ocean will be running again this year through the month of October 2017. If anyone sees any room for improvement to the codebase, has ideas, suggestions, bug-fixes, or whatever else, if you want to win a free Hacktoberfest t-shirt and some stickers, consider signing up for this year and sending some pull requests to this repository. :-)

For more details: https://hacktoberfest.digitalocean.com/#details

Issue will remain open until the end of October.

NumberEntered missing

Hello,

When running results with Aggregator it appears that NumberEntered is always 0.

When I simply hack it up with the following I have returned numbers:

    private function stripInvalidCharactersAndSort(&$In)
    {
        $In = explode("\n", strtolower(trim(str_replace("\r", '', $In))));
        $InCount = count($In);
        $this->NumberEntered = $InCount;
        if (isset($this->callbacks['newParse']) && is_callable($this->callbacks['newParse'])) {
            $this->callbacks['newParse']($InCount);
        }
        unset($InCount);

Not sure if this is the best place or not, or if better before in the previous function on the intake?

Thanks!

Support for netmasks.

Possible future feature: Adding support for netmasks to the Aggregator (currently it just supports IPs and CIDRs).

This has been requested by several different people now, both privately and publicly, so I'm pretty sure this is something that others would find useful. Most recently requested via PHPClasses.org:

I think it's a good idea, but it's currently a low-priority thing for me (got too many other things to do for too many other projects already). I've got a reasonably good idea of how I could go about doing it though, if and when it happens. Definitely not an impossible thing to do.

If anyone else wanted to give it a whirl, they're welcome to it. Otherwise, I should be able to make a start on it at some point next month or thereafter, probably.

Creating this issue for reference and labeling as "attention required".

Performance issue on stripInvalidRangesAndSubs ?

Hi there,

I'm wondering if there's any known issue with performance when trying to feed in 100k prefixes? When I enable some extra output on the classes/functions I find that it seems to drag along at stripInvalidRangesAndSubs($this->Output), specifically the $Line area I think.

Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.