# @types/graphite-udp

> TypeScript definitions for graphite-udp

Latest version **1.2.10** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/graphite-udp
pnpm add @types/graphite-udp
yarn add @types/graphite-udp
bun add @types/graphite-udp
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.10 |
| Published | 2023-11-07 |
| First published | 2017-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/graphite-udp
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphite-udp
- npm.io page: https://npm.io/package/@types/graphite-udp

## Recent versions

- 1.2.10 (latest) — 2023-11-07
- 1.2.7 (ts3.6) — 2021-07-08
- 1.2.6 (ts3.0) — 2020-05-15
- 1.2.5 (ts2.0) — 2017-10-25
- 1.2.9 — 2023-10-18
- 1.2.8 — 2023-09-20
- 1.2.4 — 2017-08-21
- 1.2.3 — 2017-04-17
- 1.2.2 — 2017-03-31
- 1.2.1 — 2017-03-24
- 1.2.0 — 2017-03-10

## README

# Installation
> `npm install --save @types/graphite-udp`

# Summary
This package contains type definitions for graphite-udp (https://github.com/fermads/graphite-udp).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphite-udp.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphite-udp/index.d.ts)
````ts
export interface ClientOptions {
    /**
     * graphite server host or ip
     * Defaults to 127.0.0.1
     */
    host?: string | undefined;

    /**
     * graphite server udp port
     * Defaults to 2003
     */
    port?: number | undefined;

    /**
     * udp type (udp4 or udp6)
     * Defaults to udp4
     */
    type?: "udp4" | "udp6" | undefined;

    /**
     * split into smaller UDP packets
     * Defaults to 4096
     */
    maxPacketSize?: number | undefined;

    /**
     * Prefix for each metric name
     * Defaults to ''
     */
    prefix?: string | undefined;

    /**
     * Suffix for each metrtic name
     * Defaults to ''
     */
    suffix?: string | undefined;

    /**
     * Interval to group metrics by in milliseconds
     * Defaults to 5000 (5s)
     */
    interval?: number | undefined;

    /**
     * log messages to console
     * Defaults to false
     */
    verbose?: boolean | undefined;

    /**
     * called when metrics are sent
     * Defaults to null
     */
    callback?(error: Error, metrics: any): void;
}

export class Client {
    constructor(clientOptions?: ClientOptions);

    /**
     * During the interval time option, if 2 or more metrics with the same name are sent, metrics will be added (summed)
     */
    add(name: string, value: number): void;

    /**
     * During the interval time option, if 2 or more metrics with the same name are sent, the last one will be used
     */
    put(name: string, value: number): void;

    /**
     * Close the underlying UDP client socket
     *
     * @return void
     */
    close(): void;
}

export function createClient(clientOptions?: ClientOptions): Client;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Eric Byers](https://github.com/EricByers).

---
_Source: https://npm.io/package/@types/graphite-udp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
