Skip to content

Support page-wise nodes processing #14

@sgeb

Description

@sgeb

Currently there are two ways to get a list of nodes:

  1. fetch and return a single page (default size: 200), then make a subsequent call to go-acd to get the next page
  2. fetch all nodes (loop hidden behind the method call) and return all nodes at once

Both are suboptimal: 1. puts the burden of loop coordination onto go-acd client, 2. blocks the go-acd client until all nodes have been retrieved and stores them all in memory until final processing.

The best of both approaches is to support page-wise processing of nodes. The go-acd client would pass a function which gets called for every fetched page.

A further improvement is to enable concurrent operations through goroutines and channels: fetch the nodes in a goroutine, send unmarshalled nodes into a channel, process them in parallel to fetching the next page.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions