pdserver

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValidPartitionID

func GetValidPartitionID(numStr string) (int, error)

func GetValidPartitionNum

func GetValidPartitionNum(numStr string) (int, error)

func GetValidReplicator

func GetValidReplicator(r string) (int, error)

func SLogger

func SLogger() *common.LevelLogger

func SetLogger

func SetLogger(level int32, logger common.Logger)

Types

type PartitionNodeInfo

type PartitionNodeInfo struct {
	Leader   nodeInfo   `json:"leader"`
	Replicas []nodeInfo `json:"replicas"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf *ServerConfig) *Server

func (*Server) DelTombstonePDNode

func (s *Server) DelTombstonePDNode(nid string) bool

func (*Server) IsTombstonePDNode

func (s *Server) IsTombstonePDNode(nid string) bool

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

func (*Server) TombstonePDNode

func (s *Server) TombstonePDNode(nid string, n cluster.NodeInfo)

type ServerConfig

type ServerConfig struct {
	HTTPAddress        string `flag:"http-address"`
	BroadcastAddr      string `flag:"broadcast-address"`
	BroadcastInterface string `flag:"broadcast-interface"`

	ReverseProxyPort string `flag:"reverse-proxy-port"`
	ProfilePort      string `flag:"profile-port"`

	ClusterID                  string   `flag:"cluster-id"`
	ClusterLeadershipAddresses string   `flag:"cluster-leadership-addresses" cfg:"cluster_leadership_addresses"`
	AutoBalanceAndMigrate      bool     `flag:"auto-balance-and-migrate"`
	BalanceInterval            []string `flag:"balance-interval"`

	LogLevel    int32  `flag:"log-level" cfg:"log_level"`
	LogDir      string `flag:"log-dir" cfg:"log_dir"`
	DataDir     string `flag:"data-dir" cfg:"data_dir"`
	LearnerRole string `flag:"learner-role" cfg:"learner_role"`
}

func NewServerConfig

func NewServerConfig() *ServerConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL