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

Add middleware for checking that requested tick is within archiver's intervals #99

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

LINCKODE
Copy link
Member

No description provided.

@LINCKODE LINCKODE requested review from 0xluk and qubicmio January 27, 2025 22:00
@LINCKODE LINCKODE linked an issue Jan 27, 2025 that may be closed by this pull request
"google.golang.org/grpc/status"
)

func (s *Server) tickNumberInterceptor(ctx context.Context, req any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
Copy link
Contributor

@0xluk 0xluk Jan 28, 2025

Choose a reason for hiding this comment

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

creating the interceptor func on the server struct is not desirable, you should create an interceptor struct with only the dependency that the interceptor needs (an interface that implements only the store get status/lastprocessedtick, etc)

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.

using grpc handler middleware/interceptors for necessary endpoints
2 participants