Commit 5af25f2f authored by vicotor's avatar vicotor

update config.

parent 599bbdfe
endpoint="127.0.0.1:10002"
metrics_port = 28012 metrics_port = 28012
routines = 1 routines = 1
max_nm_update_ex = 40 max_nm_update_ex = 40
......
...@@ -26,7 +26,6 @@ type MysqlConfig struct { ...@@ -26,7 +26,6 @@ type MysqlConfig struct {
} }
type Config struct { type Config struct {
Endpoint string `json:"endpoint" toml:"endpoint"`
MetricPort int `json:"metrics_port" toml:"metrics_port"` MetricPort int `json:"metrics_port" toml:"metrics_port"`
Routines int `json:"routines" toml:"routines"` Routines int `json:"routines" toml:"routines"`
MaxNmUpdateEx int `json:"max_nm_update_ex" toml:"max_nm_update_ex"` MaxNmUpdateEx int `json:"max_nm_update_ex" toml:"max_nm_update_ex"`
......
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"github.com/IBM/sarama" "github.com/IBM/sarama"
"github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/proto"
"github.com/odysseus/cache/cachedata" "github.com/odysseus/cache/cachedata"
...@@ -17,7 +16,6 @@ import ( ...@@ -17,7 +16,6 @@ import (
"github.com/odysseus/service-registry/registry" "github.com/odysseus/service-registry/registry"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"os"
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
...@@ -43,11 +41,6 @@ func (n *Node) Status() string { ...@@ -43,11 +41,6 @@ func (n *Node) Status() string {
return n.status return n.status
} }
func (n *Node) Instance() string {
hname, _ := os.Hostname()
return fmt.Sprintf("%s:%d", hname, n.conf.Endpoint)
}
func (n *Node) DetailInfo() (json.RawMessage, error) { func (n *Node) DetailInfo() (json.RawMessage, error) {
info := query.SchedulerInfo{} info := query.SchedulerInfo{}
return json.Marshal(info) return json.Marshal(info)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment