Skip to content

Commit

Permalink
[add] hot ttl for golang sdk
Browse files Browse the repository at this point in the history
[modify] refine request timeout
  • Loading branch information
shabicheng committed Nov 5, 2021
1 parent e3c4d4e commit b66efad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion log_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type LogStore struct {
AutoSplit bool `json:"autoSplit"`
MaxSplitShard int `json:"maxSplitShard"`
AppendMeta bool `json:"appendMeta"`
ArchiveSecons int `json:"archiveSeconds"`
TelemetryType string `json:"telemetryType"`
HotTTL int `json:"hot_ttl"`

CreateTime uint32 `json:"createTime,omitempty"`
LastModifyTime uint32 `json:"lastModifyTime,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import (
"crypto/md5"
"encoding/json"
"fmt"
"github.com/go-kit/kit/log/level"
"io/ioutil"
"net/http"
"net/http/httputil"
"net/url"
"time"

"github.com/go-kit/kit/log/level"

"github.com/cenkalti/backoff"
"golang.org/x/net/context"
)

// timeout configs
var (
defaultRequestTimeout = 10 * time.Second
defaultRetryTimeout = 30 * time.Second
defaultRequestTimeout = 60 * time.Second
defaultRetryTimeout = 90 * time.Second
defaultHttpClient = &http.Client{
Timeout: defaultRequestTimeout,
}
)


func retryReadErrorCheck(ctx context.Context, err error) (bool, error) {
if err == nil {
return false, nil
Expand Down

0 comments on commit b66efad

Please sign in to comment.