process_master

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 37 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process()

func ProcessDo added in v0.5.0

func ProcessDo(handler *MasterHandler)

Types

type AdminController added in v0.5.0

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

AdminController admin控制器,管理admin进程的启动、重启

func NewAdminConfig added in v0.5.0

func NewAdminConfig(raftData dispatcher.IDispatchCenter, adminProcess *process.ProcessController) *AdminController

func (*AdminController) LeaderChange added in v0.6.0

func (ac *AdminController) LeaderChange(isLeader bool)

func (*AdminController) Stop added in v0.5.0

func (ac *AdminController) Stop()

type CtxManager added in v0.5.0

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

func NewCtxManager added in v0.5.0

func NewCtxManager() *CtxManager

func (*CtxManager) Close added in v0.5.0

func (c *CtxManager) Close() error

func (*CtxManager) Get added in v0.5.0

func (c *CtxManager) Get(name string) context.Context

func (*CtxManager) Stop added in v0.5.0

func (c *CtxManager) Stop(namespace string)

type CtxWidthCancel added in v0.5.0

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

type DataController added in v0.5.0

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

func NewDataController added in v0.5.0

func NewDataController(raftData dispatcher.IDispatchCenter, extenderManager *extender.Manager, dispatcherService *DispatcherServer) *DataController

func (*DataController) Close added in v0.5.0

func (c *DataController) Close()

type DispatcherServer added in v0.5.0

type DispatcherServer struct {
	service.UnimplementedMasterDispatcherServer
	// contains filtered or unexported fields
}

func NewDispatcherServer added in v0.5.0

func NewDispatcherServer() *DispatcherServer

func (*DispatcherServer) Close added in v0.5.0

func (d *DispatcherServer) Close() error

func (*DispatcherServer) Dispatch added in v0.5.0

func (d *DispatcherServer) Dispatch(event dispatcher.IEvent)

func (*DispatcherServer) Listen added in v0.5.0

func (*DispatcherServer) Update added in v0.5.0

func (d *DispatcherServer) Update(es []*extender.Status, success bool)

type EtcdSender added in v0.6.0

type EtcdSender struct {
	etcd.Etcd
}

func NewEtcdSender added in v0.6.0

func NewEtcdSender(etcd etcd.Etcd) *EtcdSender

func (*EtcdSender) Send added in v0.6.0

func (e *EtcdSender) Send(event string, namespace string, key string, data []byte) error

type ForkStatus added in v0.3.0

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

func (*ForkStatus) IsRunningFork added in v0.3.0

func (fs *ForkStatus) IsRunningFork() bool

func (*ForkStatus) Start added in v0.3.0

func (fs *ForkStatus) Start() bool

func (*ForkStatus) Stop added in v0.3.0

func (fs *ForkStatus) Stop() bool

type Master

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

func NewMasterHandle

func NewMasterHandle(logWriter io.Writer, cfg config.NConfig) (*Master, error)

func (*Master) Close

func (m *Master) Close()

func (*Master) EtcdInfoHandler added in v0.7.0

func (m *Master) EtcdInfoHandler(w http.ResponseWriter, r *http.Request)

func (*Master) EtcdNodesHandler added in v0.7.0

func (m *Master) EtcdNodesHandler(w http.ResponseWriter, r *http.Request)

func (*Master) Fork

func (m *Master) Fork(pFile *pidfile.PidFile) error

Fork Master fork 子进程,入参为子进程需要的内容

func (*Master) Start

func (m *Master) Start(handler *MasterHandler) error

func (*Master) Wait

func (m *Master) Wait(pFile *pidfile.PidFile) error

type MasterHandler

type MasterHandler struct {
	InitProfession func() []*eosc.ProfessionConfig
	VersionHandler func(etcd2 etcd.Etcd) http.Handler
	// contains filtered or unexported fields
}

type WorkerController

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

func NewWorkerController

func NewWorkerController(tfd *traffic.TrafficData, listensMsg config.ListenUrl, workerProcess *process.ProcessController) *WorkerController

func (*WorkerController) Stop

func (wc *WorkerController) Stop()

func (*WorkerController) Update added in v0.5.0

func (wc *WorkerController) Update(status []*extender.Status, success bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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