mirror of
https://github.com/aceld/kis-flow.git
synced 2025-01-22 23:20:24 +08:00
goimprts sort
This commit is contained in:
parent
75dde9ad96
commit
540fd35355
@ -11,7 +11,6 @@ import (
|
|||||||
"github.com/aceld/kis-flow/config"
|
"github.com/aceld/kis-flow/config"
|
||||||
"github.com/aceld/kis-flow/log"
|
"github.com/aceld/kis-flow/log"
|
||||||
"github.com/aceld/kis-flow/metrics"
|
"github.com/aceld/kis-flow/metrics"
|
||||||
"github.com/patrickmn/go-cache"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// CommitRow submits a single row of data to the Flow; multiple rows can be submitted multiple times
|
// CommitRow submits a single row of data to the Flow; multiple rows can be submitted multiple times
|
||||||
@ -174,7 +173,7 @@ func (flow *KisFlow) GetCacheData(key string) interface{} {
|
|||||||
|
|
||||||
func (flow *KisFlow) SetCacheData(key string, value interface{}, Exp time.Duration) {
|
func (flow *KisFlow) SetCacheData(key string, value interface{}, Exp time.Duration) {
|
||||||
if Exp == common.DefaultExpiration {
|
if Exp == common.DefaultExpiration {
|
||||||
flow.cache.Set(key, value, cache.DefaultExpiration)
|
flow.cache.Set(key, value, 0)
|
||||||
} else {
|
} else {
|
||||||
flow.cache.Set(key, value, Exp)
|
flow.cache.Set(key, value, Exp)
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package kis
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/aceld/kis-flow/config"
|
"github.com/aceld/kis-flow/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@ package serialize
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/aceld/kis-flow/common"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
|
"github.com/aceld/kis-flow/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DefaultSerialize struct{}
|
type DefaultSerialize struct{}
|
||||||
|
Loading…
Reference in New Issue
Block a user