Skip to content

Commit

Permalink
Add constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
afsalthaj committed Mar 31, 2024
1 parent 403a6be commit a88f93e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::http::http_request::{ApiInputPath, InputHttpRequest};
use crate::service::http_request_definition_lookup::HttpRequestDefinitionLookup;
use crate::worker_request::worker_request_to_response::WorkerRequestToResponse;
use crate::worker_request::WorkerRequest;
use crate::worker_binding::worker_binding_resolver::WorkerBindingResolver;

// Executes custom request with the help of worker_request_executor and definition_service
// This is a common API projects can make use of, similar to healthcheck service
Expand Down
4 changes: 2 additions & 2 deletions golem-worker-service-base/src/repo/api_definition_repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<Namespace, ApiDefinition> Default for InMemoryRegistry<Namespace, ApiDefini
}

#[async_trait]
impl<Namespace: ApiNamespace, ApiDefinition> ApiDefinitionRepo<Namespace, ApiDefinition> for InMemoryRegistry<Namespace, ApiDefinition> {
impl<Namespace: ApiNamespace, ApiDefinition: Send + Clone> ApiDefinitionRepo<Namespace, ApiDefinition> for InMemoryRegistry<Namespace, ApiDefinition> {
async fn register(
&self,
definition: &ApiDefinition,
Expand Down Expand Up @@ -146,7 +146,7 @@ impl RedisApiRegistry {
}

#[async_trait]
impl<Namespace: ApiNamespace, ApiDefinition> ApiDefinitionRepo<Namespace, ApiDefinition> for RedisApiRegistry {
impl<Namespace: ApiNamespace, ApiDefinition: bincode::Decode + bincode::Encode + Sync> ApiDefinitionRepo<Namespace, ApiDefinition> for RedisApiRegistry {
async fn register(
&self,
definition: &ApiDefinition,
Expand Down

0 comments on commit a88f93e

Please sign in to comment.