Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/conf/datasource/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"log"
"path/filepath"

"github.com/douyu/jupiter/pkg/conf"
"github.com/douyu/jupiter/pkg/util/xfile"
"github.com/douyu/jupiter/pkg/util/xgo"
"github.com/douyu/jupiter/pkg/xlog"
Expand All @@ -33,8 +34,8 @@ type fileDataSource struct {
changed chan struct{}
}

// NewDataSource returns new fileDataSource.
func NewDataSource(path string, watch bool) *fileDataSource {
// NewDataSource returns a file-backed configuration data source.
func NewDataSource(path string, watch bool) conf.DataSource {
absolutePath, err := filepath.Abs(path)
if err != nil {
xlog.Jupiter().Panic("new datasource", xlog.Any("err", err))
Expand Down
5 changes: 3 additions & 2 deletions pkg/conf/datasource/http/yasee.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"strconv"
"time"

"github.com/douyu/jupiter/pkg/conf"
"github.com/douyu/jupiter/pkg/util/xgo"
"github.com/douyu/jupiter/pkg/xlog"
"github.com/go-resty/resty/v2"
Expand Down Expand Up @@ -52,8 +53,8 @@ type ConfigData struct {
LastRevision int64 `json:"last_revision"`
}

// NewDataSource ...
func NewDataSource(addr string, enableWatch bool) *yaseeDataSource {
// NewDataSource returns an HTTP-backed configuration data source.
func NewDataSource(addr string, enableWatch bool) conf.DataSource {
yasee := &yaseeDataSource{
client: resty.New(),
addr: addr,
Expand Down
Loading