Skip to content

Commit

Permalink
v0.3.7
Browse files Browse the repository at this point in the history
Change shutdown drain to be synchronous
  • Loading branch information
8naama authored Sep 25, 2024
2 parents 7f55be0 + 9d5429d commit 9d74b77
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 54 deletions.
70 changes: 36 additions & 34 deletions logzio-lambda-extensions-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,44 +227,44 @@ foo: bar
| Region Name | Region Code | AWS ARN |
|---------------------------|------------------|---------------------------------------------------------------------------------|
| US East (N. Virginia) | `us-east-1` | `arn:aws:lambda:us-east-1:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| US East (Ohio) | `us-east-2` | `arn:aws:lambda:us-east-2:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| US West (N. California) | `us-west-1` | `arn:aws:lambda:us-west-1:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| US West (Oregon) | `us-west-2` | `arn:aws:lambda:us-west-2:486140753397:layer:LogzioLambdaExtensionLogs:14` |
| Europe (Frankfurt) | `eu-central-1` | `arn:aws:lambda:eu-central-1:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| Europe (Ireland) | `eu-west-1` | `arn:aws:lambda:eu-west-1:486140753397:layer:LogzioLambdaExtensionLogs:14` |
| Europe (Stockholm) | `eu-north-1` | `arn:aws:lambda:eu-north-1:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| Asia Pacific (Sydney) | `ap-southeast-2` | `arn:aws:lambda:ap-southeast-2:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| Canada (Central) | `ca-central-1` | `arn:aws:lambda:ca-central-1:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| South America (São Paulo) | `sa-east-1` | `arn:aws:lambda:sa-east-1:486140753397:layer:LogzioLambdaExtensionLogs:17` |
| Asia Pacific (Tokyo) | `ap-northeast-1` | `arn:aws:lambda:ap-northeast-1:486140753397:layer:LogzioLambdaExtensionLogs:11` |
| Asia Pacific (Singapore) | `ap-southeast-1` | `arn:aws:lambda:ap-southeast-1:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| Asia Pacific (Mumbai) | `ap-south-1` | `arn:aws:lambda:ap-south-1:486140753397:layer:LogzioLambdaExtensionLogs:11` |
| Asia Pacific (Osaka) | `ap-northeast-3` | `arn:aws:lambda:ap-northeast-3:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| Asia Pacific (Seoul) | `ap-northeast-2` | `arn:aws:lambda:ap-northeast-2:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| Europe (London) | `eu-west-2` | `arn:aws:lambda:eu-west-2:486140753397:layer:LogzioLambdaExtensionLogs:13` |
| Europe (Paris) | `eu-west-3` | `arn:aws:lambda:eu-west-3:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| US East (N. Virginia) | `us-east-1` | `arn:aws:lambda:us-east-1:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| US East (Ohio) | `us-east-2` | `arn:aws:lambda:us-east-2:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| US West (N. California) | `us-west-1` | `arn:aws:lambda:us-west-1:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| US West (Oregon) | `us-west-2` | `arn:aws:lambda:us-west-2:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| Europe (Frankfurt) | `eu-central-1` | `arn:aws:lambda:eu-central-1:486140753397:layer:LogzioLambdaExtensionLogs:17` |
| Europe (Ireland) | `eu-west-1` | `arn:aws:lambda:eu-west-1:486140753397:layer:LogzioLambdaExtensionLogs:15` |
| Europe (Stockholm) | `eu-north-1` | `arn:aws:lambda:eu-north-1:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| Asia Pacific (Sydney) | `ap-southeast-2` | `arn:aws:lambda:ap-southeast-2:486140753397:layer:LogzioLambdaExtensionLogs:16` |
| Canada (Central) | `ca-central-1` | `arn:aws:lambda:ca-central-1:486140753397:layer:LogzioLambdaExtensionLogs:17` |
| South America (São Paulo) | `sa-east-1` | `arn:aws:lambda:sa-east-1:486140753397:layer:LogzioLambdaExtensionLogs:18` |
| Asia Pacific (Tokyo) | `ap-northeast-1` | `arn:aws:lambda:ap-northeast-1:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| Asia Pacific (Singapore) | `ap-southeast-1` | `arn:aws:lambda:ap-southeast-1:486140753397:layer:LogzioLambdaExtensionLogs:13` |
| Asia Pacific (Mumbai) | `ap-south-1` | `arn:aws:lambda:ap-south-1:486140753397:layer:LogzioLambdaExtensionLogs:12` |
| Asia Pacific (Osaka) | `ap-northeast-3` | `arn:aws:lambda:ap-northeast-3:486140753397:layer:LogzioLambdaExtensionLogs:13` |
| Asia Pacific (Seoul) | `ap-northeast-2` | `arn:aws:lambda:ap-northeast-2:486140753397:layer:LogzioLambdaExtensionLogs:13` |
| Europe (London) | `eu-west-2` | `arn:aws:lambda:eu-west-2:486140753397:layer:LogzioLambdaExtensionLogs:14` |
| Europe (Paris) | `eu-west-3` | `arn:aws:lambda:eu-west-3:486140753397:layer:LogzioLambdaExtensionLogs:13` |
## ARM64 Architecture
| Region Name | Region Code | AWS ARN |
|---------------------------|------------------|-----------------------------------------------------------------------------------|
| US East (N. Virginia) | `us-east-1` | `arn:aws:lambda:us-east-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| US East (Ohio) | `us-east-2` | `arn:aws:lambda:us-east-2:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| US West (N. California) | `us-west-1` | `arn:aws:lambda:us-west-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| US West (Oregon) | `us-west-2` | `arn:aws:lambda:us-west-2:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| Europe (Frankfurt) | `eu-central-1` | `arn:aws:lambda:eu-central-1:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| Europe (Ireland) | `eu-west-1` | `arn:aws:lambda:eu-west-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Europe (Stockholm) | `eu-north-1` | `arn:aws:lambda:eu-north-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Sydney) | `ap-southeast-2` | `arn:aws:lambda:ap-southeast-2:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| Canada (Central) | `ca-central-1` | `arn:aws:lambda:ca-central-1:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| South America (São Paulo) | `sa-east-1` | `arn:aws:lambda:sa-east-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Tokyo) | `ap-northeast-1` | `arn:aws:lambda:ap-northeast-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Singapore) | `ap-southeast-1` | `arn:aws:lambda:ap-southeast-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Mumbai) | `ap-south-1` | `arn:aws:lambda:ap-south-1:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| Asia Pacific (Osaka) | `ap-northeast-3` | `arn:aws:lambda:ap-northeast-3:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Seoul) | `ap-northeast-2` | `arn:aws:lambda:ap-northeast-2:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Europe (London) | `eu-west-2` | `arn:aws:lambda:eu-west-2:486140753397:layer:LogzioLambdaExtensionLogsArm:6` |
| Europe (Paris) | `eu-west-3` | `arn:aws:lambda:eu-west-3:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| US East (N. Virginia) | `us-east-1` | `arn:aws:lambda:us-east-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| US East (Ohio) | `us-east-2` | `arn:aws:lambda:us-east-2:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| US West (N. California) | `us-west-1` | `arn:aws:lambda:us-west-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| US West (Oregon) | `us-west-2` | `arn:aws:lambda:us-west-2:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Europe (Frankfurt) | `eu-central-1` | `arn:aws:lambda:eu-central-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Europe (Ireland) | `eu-west-1` | `arn:aws:lambda:eu-west-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Europe (Stockholm) | `eu-north-1` | `arn:aws:lambda:eu-north-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Asia Pacific (Sydney) | `ap-southeast-2` | `arn:aws:lambda:ap-southeast-2:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Canada (Central) | `ca-central-1` | `arn:aws:lambda:ca-central-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| South America (São Paulo) | `sa-east-1` | `arn:aws:lambda:sa-east-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Asia Pacific (Tokyo) | `ap-northeast-1` | `arn:aws:lambda:ap-northeast-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Asia Pacific (Singapore) | `ap-southeast-1` | `arn:aws:lambda:ap-southeast-1:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Asia Pacific (Mumbai) | `ap-south-1` | `arn:aws:lambda:ap-south-1:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Asia Pacific (Osaka) | `ap-northeast-3` | `arn:aws:lambda:ap-northeast-3:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Asia Pacific (Seoul) | `ap-northeast-2` | `arn:aws:lambda:ap-northeast-2:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
| Europe (London) | `eu-west-2` | `arn:aws:lambda:eu-west-2:486140753397:layer:LogzioLambdaExtensionLogsArm:7` |
| Europe (Paris) | `eu-west-3` | `arn:aws:lambda:eu-west-3:486140753397:layer:LogzioLambdaExtensionLogsArm:8` |
### Lambda extension versions
Expand All @@ -279,6 +279,8 @@ foo: bar
**NOTE:** If your AWS region is not in the list, please reach out to Logz.io's support or open an issue in this repo.
### Changelog:
- **0.3.7**:
- Change `SHUTDOWN` event flush to synchronous.
- **0.3.6**:
- Drain queue upon shutdown event.
- **0.3.5**:
Expand Down
2 changes: 1 addition & 1 deletion logzio-lambda-extensions-logs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

require (
github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259
github.com/logzio/logzio-go v1.0.7
github.com/logzio/logzio-go v1.0.8
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
Expand Down
19 changes: 2 additions & 17 deletions logzio-lambda-extensions-logs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/logzio/logzio-go v1.0.7 h1:aKGuKSkvnkY5okCKsQE50ICOGn4BN1MFG2y1jQG47XY=
github.com/logzio/logzio-go v1.0.7/go.mod h1:ljlI3Zfi3hntJiHqCqWSUPT9cZP6yvDHUzDl5ZLGYRE=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/logzio/logzio-go v1.0.8 h1:wT9TAdTR/WVb2Gy6VYorPsJ2AhhTxp3FqB7Cic76C7A=
github.com/logzio/logzio-go v1.0.8/go.mod h1:j7HsB56omyQR05Gm/mr8jxaO8MIaOL1Lb/uRTqfe9nc=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand All @@ -29,30 +26,22 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI=
github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
github.com/vjeantet/grok v1.0.1 h1:2rhIR7J4gThTgcZ1m2JY4TrJZNgjn985U28kT2wQrJ4=
github.com/vjeantet/grok v1.0.1/go.mod h1:ax1aAchzC6/QMXMcyzHQGZWaW1l195+uMYIkCWPCNIo=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
Expand All @@ -61,16 +50,12 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
Expand Down
5 changes: 3 additions & 2 deletions logzio-lambda-extensions-logs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"path"
"strings"
"syscall"
"time"
)

// INITIAL_QUEUE_SIZE is the initial size set for the synchronous logQueue
Expand Down Expand Up @@ -122,13 +123,13 @@ func main() {
select {
case <-ctx.Done():
logger.Info(printPrefix, "Received context done event")
logsApiLogger.Drain()
logsApiLogger.AwaitDrain(time.Millisecond * 1800)
logsApiAgent.Shutdown()
logger.Info(printPrefix, "Exiting")
return
case <-eventChannel:
logger.Info(printPrefix, "Received SHUTDOWN event")
logsApiLogger.Drain()
logsApiLogger.AwaitDrain(time.Millisecond * 1800)
logsApiAgent.Shutdown()
logger.Info(printPrefix, "Exiting")
return
Expand Down

0 comments on commit 9d74b77

Please sign in to comment.