New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cloudvision-grpc-web

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudvision-grpc-web

A Grpc-Web client for CloudVision

  • 5.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

cloudvision-grpc-web

A grpc-web client for requesting CloudVision data from the frontend. This libraries exposed functions and utils that convert the grpc-web calls to Observable streams that can be manipulated using RXJS.

The package expects protobuf definitions to be generated via ts-proto

Installation

npm install cloudvision-grpc-web

or

yarn install cloudvision-grpc-web

Usage

import { fromResourceGrpcInvoke } from 'cloudvision-grpc-web';

import { DeviceServiceGetAllDesc, DeviceStreamRequest } from '../generated/arista/inventory.v1/services.gen';

const requestAllMessage = DeviceStreamRequest.fromPartial({});

const grpcRequest = fromResourceGrpcInvoke(DeviceServiceGetAllDesc, {
  host: 'http://cvphost',
  request: { ...requestAllMessage, ...DeviceServiceGetAllDesc.requestType },
});

// Will print out each data message as it arrives
grpcRequest.data.subscribe({
  next: (val) => console.log('data', val))
})

// Will print out any Grpc metadata or errors as they happen
grpcRequest.messages.subscribe({
  next: (val) => console.log('control message', val))
})

Keywords

FAQs

Package last updated on 18 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc