1 | import { Duration } from '@aws-cdk/core';
|
2 | import { ContainerDefinition } from '../container-definition';
|
3 | import { BaseLogDriverProps } from './base-log-driver';
|
4 | import { LogDriver, LogDriverConfig } from './log-driver';
|
5 | import { Construct as CoreConstruct } from '@aws-cdk/core';
|
6 | /**
|
7 | * The type of compression the GELF driver uses to compress each log message.
|
8 | */
|
9 | export declare enum GelfCompressionType {
|
10 | GZIP = "gzip",
|
11 | ZLIB = "zlib",
|
12 | NONE = "none"
|
13 | }
|
14 | /**
|
15 | * Specifies the journald log driver configuration options.
|
16 | *
|
17 | * [Source](https://docs.docker.com/config/containers/logging/gelf/)
|
18 | */
|
19 | export interface GelfLogDriverProps extends BaseLogDriverProps {
|
20 | /**
|
21 | * The address of the GELF server. tcp and udp are the only supported URI
|
22 | * specifier and you must specify the port.
|
23 | */
|
24 | readonly address: string;
|
25 | /**
|
26 | * UDP Only The type of compression the GELF driver uses to compress each
|
27 | * log message. Allowed values are gzip, zlib and none.
|
28 | *
|
29 | * @default - gzip
|
30 | */
|
31 | readonly compressionType?: GelfCompressionType;
|
32 | /**
|
33 | * UDP Only The level of compression when gzip or zlib is the gelf-compression-type.
|
34 | * An integer in the range of -1 to 9 (BestCompression). Higher levels provide more
|
35 | * compression at lower speed. Either -1 or 0 disables compression.
|
36 | *
|
37 | * @default - 1
|
38 | */
|
39 | readonly compressionLevel?: number;
|
40 | /**
|
41 | * TCP Only The maximum number of reconnection attempts when the connection drop.
|
42 | * A positive integer.
|
43 | *
|
44 | * @default - 3
|
45 | */
|
46 | readonly tcpMaxReconnect?: number;
|
47 | /**
|
48 | * TCP Only The number of seconds to wait between reconnection attempts.
|
49 | * A positive integer.
|
50 | *
|
51 | * @default - 1
|
52 | */
|
53 | readonly tcpReconnectDelay?: Duration;
|
54 | }
|
55 | /**
|
56 | * A log driver that sends log information to journald Logs.
|
57 | */
|
58 | export declare class GelfLogDriver extends LogDriver {
|
59 | private readonly props;
|
60 | /**
|
61 | * Constructs a new instance of the GelfLogDriver class.
|
62 | *
|
63 | * @param props the gelf log driver configuration options.
|
64 | */
|
65 | constructor(props: GelfLogDriverProps);
|
66 | /**
|
67 | * Called when the log driver is configured on a container
|
68 | */
|
69 | bind(_scope: CoreConstruct, _containerDefinition: ContainerDefinition): LogDriverConfig;
|
70 | }
|