Socket
Socket
Sign inDemoInstall

@jolie/influxdb

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jolie/influxdb

Connector Jolie for InfluxDB


Version published
Maintainers
5
Created
Source

jolie-influxdb

This is the Jolie language influx connector

Installation

jpm add @jolie/influxdb

Usage

from @jolie.influxdb.jolie-influxdb import InfluxDBConnector

Operations


interface InfluxDBInterface{
RequestResponse:
  connect (ConnectRequest)(ConnectResponse),
  write(WriteRequest)(WriteResponse),
  query(QueryRequest)(QueryResponse)
}

connect

This operation allows your service to connect to the to your instance of InfluxDB

type ConnectRequest:void{
 token:string
 org:string
 url:string
 bucket:string
}

example

   connect@influxdb({
       token = "I0kn4_sybERDjvNrG44LWsDax6ozSNsDvcVewqyIn3WlEJ1c6K37pUOGK7K6d7EJHhZh8iQEcpBFWJzz5O1fqg=="
       org = "org"
       url = "http://localhost:8086"
       bucket = "test"
   })()

write

This operation allows the user to write on InfluxDB

type WriteRequest:void {
measurement:string
values*:void{
  time?:long
  fields:undefined
}
}

example

   write@influxdb({
       measurement = "example"
       values.fields.sensor1= 100
       values.fields.sensor2= 2.0
   })()

the time can be express as long epoc value if not present like in the example the connector with assign the current in time

query

type QueryRequest:void{
 .query:string
}

the query uses influxDB query format example

query@influxdb({
          query = "from(bucket: \"test\") |> range(start: -1h) |> filter(fn: (r) => r[\"_measurement\"] == \"example\")" 
        })(responseQuery)

the response type is

type QueryResponse:void{
  tables*:void{
      values*:void{
        time?:long
        field:undefined
      }
  }
}

Keywords

FAQs

Package last updated on 03 Aug 2021

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc