Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query protocols and policies #81

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

dennis-tra
Copy link
Contributor

No description provided.

kad/kad.go Outdated
CloserNodes() []NodeInfo[K, N, A]
}

type Protocol[K Key[K], N NodeID[K], A Address[A]] interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reasoning for adding N as a parameter to all these types?

Can't we just use the following

type Protocol[K Key[K],  A Address[A]] interface {	
	Get(ctx context.Context, to N NodeID[K], target K) (Response[K, A], error)
	Put(ctx context.Context, to N NodeID[K], record []byte) error
}

Base automatically changed from statemachine-prime to main August 8, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants