MM-40676: Bump dependencies (#19525)
https://mattermost.atlassian.net/browse/MM-40676 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
440790dad6
Коммит
57eafbc6ca
2
vendor/github.com/rudderlabs/analytics-go/License.md
сгенерированный
поставляемый
2
vendor/github.com/rudderlabs/analytics-go/License.md
сгенерированный
поставляемый
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Segment, Inc.
|
||||
Copyright (c) 2019 RudderStack.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
4
vendor/github.com/rudderlabs/analytics-go/analytics.go
сгенерированный
поставляемый
4
vendor/github.com/rudderlabs/analytics-go/analytics.go
сгенерированный
поставляемый
@@ -537,7 +537,7 @@ func (c *client) push(q *messageQueue, m Message, wg *sync.WaitGroup, ex *execut
|
||||
var msg message
|
||||
var err error
|
||||
|
||||
if msg, err = makeMessage(m, maxMessageBytes); err != nil {
|
||||
if msg, err = makeMessage(m, c.MaxMessageBytes); err != nil {
|
||||
c.errorf("%s - %v", err, m)
|
||||
c.notifyFailure([]message{{m, nil}}, err)
|
||||
return
|
||||
@@ -578,7 +578,7 @@ func (c *client) maxBatchBytes() int {
|
||||
SentAt: c.now(),
|
||||
Context: c.DefaultContext,
|
||||
})
|
||||
return maxBatchBytes - len(b)
|
||||
return c.MaxBatchBytes - len(b)
|
||||
}
|
||||
|
||||
func (c *client) notifySuccess(msgs []message) {
|
||||
|
||||
30
vendor/github.com/rudderlabs/analytics-go/config.go
сгенерированный
поставляемый
30
vendor/github.com/rudderlabs/analytics-go/config.go
сгенерированный
поставляемый
@@ -82,6 +82,12 @@ type Config struct {
|
||||
//This variable will disable checking for the cluster-info end point and
|
||||
//split the payload at node level for multi node setup
|
||||
NoProxySupport bool
|
||||
|
||||
// Maximum bytes in a message
|
||||
MaxMessageBytes int
|
||||
|
||||
// Maximum bytes in a batch
|
||||
MaxBatchBytes int
|
||||
}
|
||||
|
||||
// This constant sets the default endpoint to which client instances send
|
||||
@@ -116,6 +122,22 @@ func (c *Config) validate() error {
|
||||
}
|
||||
}
|
||||
|
||||
if c.MaxMessageBytes < 0 {
|
||||
return ConfigError{
|
||||
Reason: "negetive value is not supported for MaxMessageBytes",
|
||||
Field: "MaxMessageBytes",
|
||||
Value: c.MaxMessageBytes,
|
||||
}
|
||||
}
|
||||
|
||||
if c.MaxBatchBytes < 0 {
|
||||
return ConfigError{
|
||||
Reason: "negetive value is not supported for MaxBatchBytes",
|
||||
Field: "MaxBatchBytes",
|
||||
Value: c.MaxBatchBytes,
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -162,6 +184,14 @@ func makeConfig(c Config) Config {
|
||||
c.maxConcurrentRequests = 1000
|
||||
}
|
||||
|
||||
if c.MaxMessageBytes == 0 {
|
||||
c.MaxMessageBytes = defMaxMessageBytes
|
||||
}
|
||||
|
||||
if c.MaxBatchBytes == 0 {
|
||||
c.MaxBatchBytes = defMaxBatchBytes
|
||||
}
|
||||
|
||||
// We always overwrite the 'library' field of the default context set on the
|
||||
// client because we want this information to be accurate.
|
||||
c.DefaultContext.Library = LibraryInfo{
|
||||
|
||||
4
vendor/github.com/rudderlabs/analytics-go/message.go
сгенерированный
поставляемый
4
vendor/github.com/rudderlabs/analytics-go/message.go
сгенерированный
поставляемый
@@ -126,6 +126,6 @@ func (q *messageQueue) flush() (msgs []message) {
|
||||
}
|
||||
|
||||
const (
|
||||
maxBatchBytes = 500000
|
||||
maxMessageBytes = 32000
|
||||
defMaxBatchBytes = 500000 // ~500 KB
|
||||
defMaxMessageBytes = 32000 // ~32 KB
|
||||
)
|
||||
|
||||
Ссылка в новой задаче
Block a user