{"id":38172572,"url":"https://github.com/cble-platform/cble-provider-grpc","last_synced_at":"2026-01-16T23:28:40.592Z","repository":{"id":206247437,"uuid":"716184740","full_name":"cble-platform/cble-provider-grpc","owner":"cble-platform","description":"Custom gRPC-based communication protocol for CBLE Providers","archived":false,"fork":false,"pushed_at":"2024-04-25T16:30:59.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-25T17:41:34.317Z","etag":null,"topics":["grpc","protobuf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cble-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-11-08T16:00:36.000Z","updated_at":"2024-04-25T16:30:51.000Z","dependencies_parsed_at":"2024-04-17T03:31:13.423Z","dependency_job_id":"a125ea28-ec23-459e-8ed5-0b627190d995","html_url":"https://github.com/cble-platform/cble-provider-grpc","commit_stats":null,"previous_names":["cble-platform/cble-provider-grpc"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cble-platform/cble-provider-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cble-platform%2Fcble-provider-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cble-platform%2Fcble-provider-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cble-platform%2Fcble-provider-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cble-platform%2Fcble-provider-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cble-platform","download_url":"https://codeload.github.com/cble-platform/cble-provider-grpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cble-platform%2Fcble-provider-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28487586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T22:54:02.790Z","status":"ssl_error","status_checked_at":"2026-01-16T22:50:10.344Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc","protobuf"],"created_at":"2026-01-16T23:28:40.481Z","updated_at":"2026-01-16T23:28:40.568Z","avatar_url":"https://github.com/cble-platform.png","language":"Go","readme":"# cble-provider-grpc\n\nThis package is designed to be a communication method for the CBLE server to talk to providers.\n\n## Minimal Provider Implementation\n\n```go\npackage main\n\nimport (\n  \"context\"\n\n  cbleGRPC \"github.com/cble-platform/cble-provider-grpc/pkg/cble\"\n  commonGRPC \"github.com/cble-platform/cble-provider-grpc/pkg/common\"\n  providerGRPC \"github.com/cble-platform/cble-provider-grpc/pkg/provider\"\n  \"github.com/google/uuid\"\n  \"github.com/sirupsen/logrus\"\n)\n\nvar (\n  id      = uuid.New().String()\n  name    = \"example-provider\"\n  version = \"v0.1\"\n)\n\ntype ExampleProvider struct {\n  providerGRPC.DefaultProviderServer\n}\n\nfunc (ExampleProvider) Deploy(ctx context.Context, request *providerGRPC.DeployRequest) (*providerGRPC.DeployReply, error) {\n  logrus.Infof(\"Deploying something with example provider\")\n  return \u0026providerGRPC.DeployReply{\n    DeploymentId:    request.DeploymentId,\n    Status:          commonGRPC.RPCStatus_SUCCESS,\n    DeploymentState: \u0026structpb.Struct{},\n    DeploymentVars:  \u0026structpb.Struct{},\n  }, nil\n}\n\nfunc main() {\n  conn, err := cbleGRPC.DefaultConnect()\n  if err != nil {\n    logrus.Fatalf(\"failed to connect to CBLE gRPC server: %v\", err)\n  }\n  defer conn.Close()\n\n  ctx := context.Background()\n\n  client, err := cbleGRPC.NewClient(ctx, conn)\n  if err != nil {\n    logrus.Fatalf(\"failed to connect client: %v\", err)\n  }\n\n  registerReply, err := client.RegisterProvider(ctx, \u0026cbleGRPC.RegistrationRequest{\n    Id:      id,\n    Name:    name,\n    Version: version,\n    Features: map[string]bool{\n      string(providerGRPC.ProviderFeature_DEPLOY):  true,\n      string(providerGRPC.ProviderFeature_DESTROY): false,\n    },\n  })\n  if err != nil || registerReply.Status == commonGRPC.RPCStatus_FAILURE {\n    logrus.Fatalf(\"registration failed: %v\", err)\n  } else if registerReply.Status == commonGRPC.RPCStatus_SUCCESS {\n    logrus.Printf(\"Registration success! Starting provider server on port %d\", registerReply.Port)\n  } else {\n    logrus.Fatalf(\"unknown error occurred: %v\", err)\n  }\n\n  // Gracefully deregister on provider shutdown\n  defer func() {\n    // Time to shutdown\n    unregisterReply, err := client.UnregisterProvider(ctx, \u0026cbleGRPC.UnregistrationRequest{\n      Id:      id,\n      Name:    name,\n      Version: version,\n    })\n    if err != nil || unregisterReply.Status == commonGRPC.RPCStatus_FAILURE {\n      logrus.Fatalf(\"unregistration failed: %v\", err)\n    } else if unregisterReply.Status == commonGRPC.RPCStatus_SUCCESS {\n      logrus.Print(\"Unregistration success! Shutting down...\")\n    } else {\n      logrus.Fatalf(\"unknown error occurred: %v\", err)\n    }\n  }()\n\n  // Set up the provider gRPC server\n  providerOpts := \u0026providerGRPC.ProviderServerOptions{\n    TLS:      false,\n    CertFile: \"\",\n    KeyFile:  \"\",\n    Port:     int(registerReply.Port),\n  }\n\n  // Serve the provider gRPC server (blocking call)\n  if err := providerGRPC.Serve(ExampleProvider{}, providerOpts); err != nil {\n    logrus.Fatalf(\"failed to server provider gRPC server: %v\", err)\n  }\n\n  // Provider is now ready to receive communications from CBLE\n  //   (sending SIGINT/SIGTERM will shutdown the server)\n}\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcble-platform%2Fcble-provider-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcble-platform%2Fcble-provider-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcble-platform%2Fcble-provider-grpc/lists"}