Skip to content

Commit

Permalink
Merge branch 'main' into steve/pool-constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
puzpuzpuz authored Aug 12, 2024
2 parents 61f3491 + f7f593f commit b187aa3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,31 @@ func NewLineSender(ctx context.Context, opts ...LineSenderOption) (LineSender, e
return newLineSender(ctx, conf)
}

func newLineSenderConfig(t senderType) *lineSenderConfig {

Check failure on line 540 in sender.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.19.x

newLineSenderConfig redeclared in this block

Check failure on line 540 in sender.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.19.x

newLineSenderConfig redeclared in this block

Check failure on line 540 in sender.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.20.x

newLineSenderConfig redeclared in this block

Check failure on line 540 in sender.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.20.x

newLineSenderConfig redeclared in this block
switch t {
case tcpSenderType:
return &lineSenderConfig{
senderType: t,
address: defaultTcpAddress,
initBufSize: defaultInitBufferSize,
fileNameLimit: defaultFileNameLimit,
}
default:
return &lineSenderConfig{
senderType: t,
address: defaultHttpAddress,
requestTimeout: defaultRequestTimeout,
retryTimeout: defaultRetryTimeout,
minThroughput: defaultMinThroughput,
autoFlushRows: defaultAutoFlushRows,
autoFlushInterval: defaultAutoFlushInterval,
initBufSize: defaultInitBufferSize,
maxBufSize: defaultMaxBufferSize,
fileNameLimit: defaultFileNameLimit,
}
}
}

func newLineSender(ctx context.Context, conf *lineSenderConfig) (LineSender, error) {
switch conf.senderType {
case tcpSenderType:
Expand Down

0 comments on commit b187aa3

Please sign in to comment.