MM-31436: Upgrade dependencies (#16605)
* MM-31436: Upgrade dependencies Ran make update-dependencies https://mattermost.atlassian.net/browse/MM-31436 ```release-note NONE ``` * add missing dep * fix lru marshaling
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09d2f698cc
Коммит
091659c8ad
2
vendor/github.com/splitio/go-client/v6/splitio/version.go
сгенерированный
поставляемый
2
vendor/github.com/splitio/go-client/v6/splitio/version.go
сгенерированный
поставляемый
@@ -1,4 +1,4 @@
|
||||
package splitio
|
||||
|
||||
// Version contains a string with the split sdk version
|
||||
const Version = "6.0.0"
|
||||
const Version = "6.0.1"
|
||||
|
||||
20
vendor/github.com/splitio/go-split-commons/v2/push/dtos.go
сгенерированный
поставляемый
20
vendor/github.com/splitio/go-split-commons/v2/push/dtos.go
сгенерированный
поставляемый
@@ -1,5 +1,10 @@
|
||||
package push
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/splitio/go-toolkit/v3/common"
|
||||
)
|
||||
|
||||
// IncomingEvent struct to process every kind of notification that comes from streaming
|
||||
type IncomingEvent struct {
|
||||
id *string
|
||||
@@ -16,6 +21,21 @@ type IncomingEvent struct {
|
||||
href *string
|
||||
}
|
||||
|
||||
func (i *IncomingEvent) String() string {
|
||||
return fmt.Sprintf(`Incoming event [id="%s", ts=%d, enc="%s", data="%s", name="%s", client="%s", `+
|
||||
`event="%s", channel="%s", code=%d, status=%d]`,
|
||||
common.StringFromRef(i.id),
|
||||
common.Int64FromRef(i.timestamp),
|
||||
common.StringFromRef(i.encoding),
|
||||
common.StringFromRef(i.data),
|
||||
common.StringFromRef(i.name),
|
||||
common.StringFromRef(i.clientID),
|
||||
i.event,
|
||||
common.StringFromRef(i.channel),
|
||||
common.IntFromRef(i.code),
|
||||
common.IntFromRef(i.statusCode))
|
||||
}
|
||||
|
||||
// Metrics dto
|
||||
type Metrics struct {
|
||||
Publishers int `json:"publishers"`
|
||||
|
||||
53
vendor/github.com/splitio/go-toolkit/v3/common/interface.go
сгенерированный
поставляемый
Обычный файл
53
vendor/github.com/splitio/go-toolkit/v3/common/interface.go
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1,53 @@
|
||||
package common
|
||||
|
||||
// AsIntOrNil returns ref
|
||||
func AsIntOrNil(data interface{}) *int {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(int)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return IntRef(number)
|
||||
}
|
||||
|
||||
// AsInt64OrNil returns ref
|
||||
func AsInt64OrNil(data interface{}) *int64 {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(int64)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return Int64Ref(number)
|
||||
}
|
||||
|
||||
// AsFloat64OrNil return ref
|
||||
func AsFloat64OrNil(data interface{}) *float64 {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(float64)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return Float64Ref(number)
|
||||
}
|
||||
|
||||
// AsStringOrNil returns ref
|
||||
func AsStringOrNil(data interface{}) *string {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
str, ok := data.(string)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return StringRef(str)
|
||||
}
|
||||
87
vendor/github.com/splitio/go-toolkit/v3/common/refutil.go
сгенерированный
поставляемый
87
vendor/github.com/splitio/go-toolkit/v3/common/refutil.go
сгенерированный
поставляемый
@@ -5,29 +5,50 @@ func StringRef(str string) *string {
|
||||
return &str
|
||||
}
|
||||
|
||||
// StringFromRef returns original value if not empty. Default otherwise.
|
||||
func StringFromRef(str *string) string {
|
||||
if str == nil {
|
||||
return ""
|
||||
}
|
||||
return *str
|
||||
}
|
||||
|
||||
// IntRef returns ref
|
||||
func IntRef(number int) *int {
|
||||
return &number
|
||||
}
|
||||
|
||||
// IntFromRef returns 0 if nil, dereferenced value otherwhise.
|
||||
func IntFromRef(ref *int) int {
|
||||
if ref == nil {
|
||||
return 0
|
||||
}
|
||||
return *ref
|
||||
}
|
||||
|
||||
// Int64Ref returns ref
|
||||
func Int64Ref(number int64) *int64 {
|
||||
return &number
|
||||
}
|
||||
|
||||
// Float64Ref returns ref
|
||||
func Float64Ref(number float64) *float64 {
|
||||
return &number
|
||||
}
|
||||
|
||||
// Int64Value returns value
|
||||
func Int64Value(number *int64) int64 {
|
||||
// Int64FromRef returns value
|
||||
func Int64FromRef(number *int64) int64 {
|
||||
if number == nil {
|
||||
return 0
|
||||
}
|
||||
return *number
|
||||
}
|
||||
|
||||
// Int64Value kept to prevent breaking change. TODO: Deprecate in v4
|
||||
func Int64Value(number *int64) int64 {
|
||||
return Int64FromRef(number)
|
||||
}
|
||||
|
||||
// Float64Ref returns ref
|
||||
func Float64Ref(number float64) *float64 {
|
||||
return &number
|
||||
}
|
||||
|
||||
// IntRefOrNil returns ref
|
||||
func IntRefOrNil(number int) *int {
|
||||
if number == 0 {
|
||||
@@ -51,55 +72,3 @@ func StringRefOrNil(str string) *string {
|
||||
}
|
||||
return StringRef(str)
|
||||
}
|
||||
|
||||
// AsIntOrNil returns ref
|
||||
func AsIntOrNil(data interface{}) *int {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(int)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return IntRef(number)
|
||||
}
|
||||
|
||||
// AsInt64OrNil returns ref
|
||||
func AsInt64OrNil(data interface{}) *int64 {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(int64)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return Int64Ref(number)
|
||||
}
|
||||
|
||||
// AsFloat64OrNil return ref
|
||||
func AsFloat64OrNil(data interface{}) *float64 {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
number, ok := data.(float64)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return Float64Ref(number)
|
||||
}
|
||||
|
||||
// AsStringOrNil returns ref
|
||||
func AsStringOrNil(data interface{}) *string {
|
||||
if data == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
str, ok := data.(string)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return StringRef(str)
|
||||
}
|
||||
|
||||
8
vendor/github.com/splitio/go-toolkit/v3/sse/sse.go
сгенерированный
поставляемый
8
vendor/github.com/splitio/go-toolkit/v3/sse/sse.go
сгенерированный
поставляемый
@@ -71,7 +71,7 @@ func (l *SSEClient) Shutdown() {
|
||||
select {
|
||||
case l.shutdown <- struct{}{}:
|
||||
default:
|
||||
l.logger.Error("Awaited unexpected event")
|
||||
l.logger.Error("Shutdown already in progress")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ func (l *SSEClient) Do(params map[string]string, callback func(e map[string]inte
|
||||
activeGoroutines := sync.WaitGroup{}
|
||||
defer func() {
|
||||
l.logger.Info("SSE streaming exiting")
|
||||
cancel()
|
||||
shouldRun.Store(false)
|
||||
cancel()
|
||||
activeGoroutines.Wait()
|
||||
}()
|
||||
|
||||
@@ -173,7 +173,9 @@ func (l *SSEClient) Do(params map[string]string, callback func(e map[string]inte
|
||||
for shouldRun.Load().(bool) {
|
||||
event, err := l.readEvent(reader)
|
||||
if err != nil {
|
||||
l.logger.Error(err)
|
||||
if shouldRun.Load().(bool) {
|
||||
l.logger.Error(err)
|
||||
}
|
||||
close(eventChannel)
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user