Skip to content

Consider making output of List from Keystore interface streamable/chunked #1092

Description

@ilyaigpetrov

The current declaration of Keystore's List() ([]string, error) doesn't take any arguments and returns the whole list of keys per one output. I suggest making it a line-buffered stream.

// List returns a list of key identifier
List() ([]string, error)

My use case comes from ipfs/kubo#11102 (comment):

Currently the key listing accumulates all the keys and outputs them to terminal in one write.
I think, it would be better to output line-buffered stream of keys to the terminal.
It's related because the case is the same: generating keys in batches.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowdif/mediumPrior experience is likely helpfuleffort/hoursEstimated to take one or several hourskind/enhancementA net-new feature or improvement to an existing featuretopic/devexpDeveloper experience related things

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions