Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Introspection types for core #107

Merged

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented Jan 22, 2020

For libp2p/go-libp2p#775

All the introspection types/protocols required to be in core.

@aarshkshah1992 aarshkshah1992 force-pushed the feat/introspection-changes branch from 1d7548b to 50ad563 Compare January 22, 2020 16:14
@aarshkshah1992 aarshkshah1992 changed the title [WIP] Intrsopection types for core Introspection types for core Jan 23, 2020
@aarshkshah1992 aarshkshah1992 changed the base branch from master to feat/introspection January 23, 2020 11:53
@raulk raulk self-requested a review January 23, 2020 12:22
Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also looking good, although there's opportunity for simplification. I'm convinced we will end up rejigging/renaming the interfaces at some point, but I've focused on the implementation details for now.

// Enums.
type (
// StreamListQueryType is an Enum to represent the types of queries that can be made when looking up streams
StreamListQueryType int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can generalise this type and name it QueryOutput, with two concrete enum values: QueryOutputList, QueryOutputFull.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've come up with QueryOutputTypeFull & QueryOutputTypeIds which determine whether we want to resolve an output object completely or just fetch it's Ids.

introspection/providers_tree.go Outdated Show resolved Hide resolved
@aarshkshah1992
Copy link
Contributor Author

@raulk The first round of review has been addressed.

@raulk raulk merged commit fbc69c1 into libp2p:feat/introspection Feb 6, 2020
raulk pushed a commit that referenced this pull request Feb 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants