Skip to content

Query protocols and policies#81

Draft
dennis-tra wants to merge 32 commits into
mainfrom
statemachine-prime-protocols-and-policies
Draft

Query protocols and policies#81
dennis-tra wants to merge 32 commits into
mainfrom
statemachine-prime-protocols-and-policies

Conversation

@dennis-tra
Copy link
Copy Markdown
Contributor

No description provided.

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

type Protocol[K Key[K], N NodeID[K], A Address[A]] interface {
Copy link
Copy Markdown
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