Documentation ¶
Index ¶
- type ServerConfig
- type VDLServer
- func (l *VDLServer) AddRaftGroup(groupName string, conf *raftgroup.GroupConfig) (newGroup *raftgroup.RaftGroup, err error)
- func (l *VDLServer) GetAllLogStreamNames() []string
- func (l *VDLServer) GetLogStreamWrapper(groupName string) (raftgroup.LogStreamWrapper, error)
- func (l *VDLServer) GetRaftGroup(groupName string) (*raftgroup.RaftGroup, error)
- func (l *VDLServer) GetRuntimeConfig() *runtimeconfig.RuntimeConfig
- func (l *VDLServer) GetRuntimeConfigStore() *runtimeconfig.RuntimeConfigStore
- func (l *VDLServer) Serve() error
- func (l *VDLServer) Start() (err error)
- func (l *VDLServer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerConfig ¶
type ServerConfig struct { // VDL Admin Listener AdminListenerAddress string // client listener address ClientListenerAddress string // metrics listener address MetricsListenerAddress string // vdl server name, one vdl server have only one server name ServerName string // currently rocksdb dir StableStoreDir string // Millisecond for raft heartbeat HeartbeatMs time.Duration //Millisecond for idle connections timeout ConnectionsMaxIdle time.Duration // HeartbeatTick is 1, ElectionTicks is N times than HeartbeatTick ElectionTicks int //glog dir GlogDir string //glog level Debug bool //alarm script path AlarmScriptPath string }
func (*ServerConfig) ValidateServerConfig ¶
func (conf *ServerConfig) ValidateServerConfig() error
type VDLServer ¶
type VDLServer struct { // listen url for admin AdminListener *listener // listen url for metrics MetricsListener *listener //server config ServerConfig *ServerConfig //Runtime config RuntimeConfig *runtimeconfig.RuntimeConfig RuntimeConfigStore *runtimeconfig.RuntimeConfigStore //persistent for membership/voted id/etc.. StableStore stablestore.StableStore // server id, which is generate random ServerID int32 // chan for shutdown ShutdownCh chan struct{} // is new server IsNewServer bool // wait group for shutdown Wg sync.WaitGroup // contains filtered or unexported fields }
var (
VDLServerGlobal *VDLServer
)
func NewVDLServer ¶
func NewVDLServer(conf *ServerConfig, metricsConfig *metricsserver.MetricsServerConfig) (*VDLServer, error)
func (*VDLServer) AddRaftGroup ¶
func (*VDLServer) GetAllLogStreamNames ¶
func (*VDLServer) GetLogStreamWrapper ¶
func (l *VDLServer) GetLogStreamWrapper(groupName string) (raftgroup.LogStreamWrapper, error)
func (*VDLServer) GetRaftGroup ¶
func (*VDLServer) GetRuntimeConfig ¶
func (l *VDLServer) GetRuntimeConfig() *runtimeconfig.RuntimeConfig
func (*VDLServer) GetRuntimeConfigStore ¶
func (l *VDLServer) GetRuntimeConfigStore() *runtimeconfig.RuntimeConfigStore
Click to show internal directories.
Click to hide internal directories.