Skip to content

Instantly share code, notes, and snippets.

@mattupstate
Created November 7, 2019 03:42
Show Gist options
  • Save mattupstate/2242bd93129b886147b82f312127f052 to your computer and use it in GitHub Desktop.
Save mattupstate/2242bd93129b886147b82f312127f052 to your computer and use it in GitHub Desktop.
declare module 'humio' {
interface Options {
ssl?: boolean;
host: string;
port: number;
basePath?: string;
dataspaceId?: string;
sessionId?: string;
includeClientMetadata?: boolean;
includeSessionId?: boolean;
additionalFields?: { [key: string]: any };
ingestToken?: string;
repository?: string;
}
class Humio {
constructor(options: Options);
sendJson(
json: { [key: string]: any },
options?: {
additionalFields?: { [key: string]: any };
tags?: { [key: string]: any };
timestamp?: string;
}
): Promise<void>;
sendMessage(
message: string,
additionalFields?: { [key: string]: any }
): Promise<void>;
addMetadata(fields: { [key: string]: any }): void;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment