Documentation
¶
Index ¶
- Variables
- func Process()
- type ExtenderSettingRaft
- func (e *ExtenderSettingRaft) Append(cmd string, data []byte) error
- func (e *ExtenderSettingRaft) CommitHandler(cmd string, data []byte) error
- func (e *ExtenderSettingRaft) Complete() error
- func (e *ExtenderSettingRaft) DelExtender(group, project string) (string, bool)
- func (e *ExtenderSettingRaft) GetExtenderVersion(group, project string) (string, bool)
- func (e *ExtenderSettingRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
- func (e *ExtenderSettingRaft) ResetHandler(data []byte) error
- func (e *ExtenderSettingRaft) SetExtender(group, project, version string) error
- func (e *ExtenderSettingRaft) Snapshot() []byte
- type ForkStatus
- type IAdmin
- type IWorkerProcess
- type Master
- type MasterCliServer
- func (m *MasterCliServer) ExtendsInstall(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsResponse, error)
- func (m *MasterCliServer) ExtendsUninstall(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsUninstallResponse, error)
- func (m *MasterCliServer) ExtendsUpdate(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsResponse, error)
- func (m *MasterCliServer) Info(ctx context.Context, request *service.InfoRequest) (*service.InfoResponse, error)
- func (m *MasterCliServer) Join(ctx context.Context, request *service.JoinRequest) (*service.JoinResponse, error)
- func (m *MasterCliServer) Leave(ctx context.Context, request *service.LeaveRequest) (*service.LeaveResponse, error)
- func (m *MasterCliServer) List(ctx context.Context, request *service.ListRequest) (*service.ListResponse, error)
- type MasterHandler
- type MasterServiceServer
- type ProfessionRaft
- func (p *ProfessionRaft) Append(cmd string, data []byte) error
- func (p *ProfessionRaft) CommitHandler(cmd string, data []byte) error
- func (p *ProfessionRaft) Complete() error
- func (p *ProfessionRaft) Delete(name string) error
- func (p *ProfessionRaft) Encode(startIndex int) ([]byte, []*os.File, error)
- func (p *ProfessionRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
- func (p *ProfessionRaft) ResetHandler(data []byte) error
- func (p *ProfessionRaft) Set(name string, profession *eosc.ProfessionConfig) error
- func (p *ProfessionRaft) Snapshot() []byte
- type WorkerConfigs
- type WorkerController
- type WorkerProcess
- type WorkerServiceProxy
- func (wc *WorkerServiceProxy) AddExtender(ctx context.Context, in *service.WorkerAddExtender, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) DelExtenderCheck(ctx context.Context, in *service.WorkerDelExtender, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) Delete(ctx context.Context, in *service.WorkerDeleteRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) DeleteCheck(ctx context.Context, in *service.WorkerDeleteRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) GetWorkerProcess() service.WorkerServiceClient
- func (wc *WorkerServiceProxy) Ping(ctx context.Context, in *service.WorkerHelloRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) Reset(ctx context.Context, in *service.ResetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) Set(ctx context.Context, in *service.WorkerSetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) SetCheck(ctx context.Context, in *service.WorkerSetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
- func (wc *WorkerServiceProxy) SetWorkerProcess(client service.WorkerServiceClient)
- func (wc *WorkerServiceProxy) Status(ctx context.Context, in *service.StatusRequest, opts ...grpc.CallOption) (*service.StatusResponse, error)
- type WorkersRaft
- func (w *WorkersRaft) Append(cmd string, data []byte) error
- func (w *WorkersRaft) CommitHandler(cmd string, data []byte) error
- func (w *WorkersRaft) Complete() error
- func (w *WorkersRaft) Delete(id string) (eosc.TWorker, error)
- func (w *WorkersRaft) GetList(profession string) ([]eosc.TWorker, error)
- func (w *WorkersRaft) GetWork(id string) (eosc.TWorker, error)
- func (w *WorkersRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
- func (w *WorkersRaft) ResetHandler(data []byte) error
- func (w *WorkersRaft) Set(profession, name, driver string, data []byte) (eosc.TWorker, error)
- func (w *WorkersRaft) Snapshot() []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClientNotInit = errors.New("no client")
)
Functions ¶
Types ¶
type ExtenderSettingRaft ¶ added in v0.3.0
type ExtenderSettingRaft struct {
// contains filtered or unexported fields
}
func NewExtenderRaft ¶ added in v0.3.0
func NewExtenderRaft(service raft_service.IService) *ExtenderSettingRaft
func (*ExtenderSettingRaft) Append ¶ added in v0.3.0
func (e *ExtenderSettingRaft) Append(cmd string, data []byte) error
func (*ExtenderSettingRaft) CommitHandler ¶ added in v0.3.0
func (e *ExtenderSettingRaft) CommitHandler(cmd string, data []byte) error
func (*ExtenderSettingRaft) Complete ¶ added in v0.3.0
func (e *ExtenderSettingRaft) Complete() error
func (*ExtenderSettingRaft) DelExtender ¶ added in v0.3.0
func (e *ExtenderSettingRaft) DelExtender(group, project string) (string, bool)
func (*ExtenderSettingRaft) GetExtenderVersion ¶ added in v0.3.0
func (e *ExtenderSettingRaft) GetExtenderVersion(group, project string) (string, bool)
func (*ExtenderSettingRaft) ProcessHandler ¶ added in v0.3.0
func (e *ExtenderSettingRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
func (*ExtenderSettingRaft) ResetHandler ¶ added in v0.3.0
func (e *ExtenderSettingRaft) ResetHandler(data []byte) error
func (*ExtenderSettingRaft) SetExtender ¶ added in v0.3.0
func (e *ExtenderSettingRaft) SetExtender(group, project, version string) error
func (*ExtenderSettingRaft) Snapshot ¶ added in v0.3.0
func (e *ExtenderSettingRaft) Snapshot() []byte
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 IWorkerProcess ¶
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
func NewMasterHandle ¶
func NewMasterHandle() *Master
func (*Master) Start ¶
func (m *Master) Start(handler *MasterHandler) error
type MasterCliServer ¶ added in v0.3.0
type MasterCliServer struct { service.UnimplementedCtiServiceServer // contains filtered or unexported fields }
func NewMasterCliServer ¶ added in v0.3.0
func NewMasterCliServer(node *raft.Node, extendsRaft *ExtenderSettingRaft) *MasterCliServer
func (*MasterCliServer) ExtendsInstall ¶ added in v0.3.0
func (m *MasterCliServer) ExtendsInstall(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsResponse, error)
ExtendsInstall 安装拓展
func (*MasterCliServer) ExtendsUninstall ¶ added in v0.3.0
func (m *MasterCliServer) ExtendsUninstall(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsUninstallResponse, error)
ExtendsUninstall卸载拓展
func (*MasterCliServer) ExtendsUpdate ¶ added in v0.3.0
func (m *MasterCliServer) ExtendsUpdate(ctx context.Context, request *service.ExtendsRequest) (*service.ExtendsResponse, error)
ExtendsUpdate 更新拓展
func (*MasterCliServer) Info ¶ added in v0.3.0
func (m *MasterCliServer) Info(ctx context.Context, request *service.InfoRequest) (*service.InfoResponse, error)
Info 获取节点信息
func (*MasterCliServer) Join ¶ added in v0.3.0
func (m *MasterCliServer) Join(ctx context.Context, request *service.JoinRequest) (*service.JoinResponse, error)
Join 加入集群操作
func (*MasterCliServer) Leave ¶ added in v0.3.0
func (m *MasterCliServer) Leave(ctx context.Context, request *service.LeaveRequest) (*service.LeaveResponse, error)
Leave 将节点移除
func (*MasterCliServer) List ¶ added in v0.3.0
func (m *MasterCliServer) List(ctx context.Context, request *service.ListRequest) (*service.ListResponse, error)
List 获取节点列表
type MasterHandler ¶
type MasterHandler struct {
Professions eosc.IProfessions
}
type MasterServiceServer ¶ added in v0.3.0
type MasterServiceServer struct {
service.UnimplementedMasterServer
}
func NewMasterServiceServer ¶ added in v0.3.0
func NewMasterServiceServer() *MasterServiceServer
func (*MasterServiceServer) Hello ¶ added in v0.3.0
func (m *MasterServiceServer) Hello(ctx context.Context, request *service.HelloRequest) (*service.HelloResponse, error)
type ProfessionRaft ¶
type ProfessionRaft struct {
eosc.IProfessions
}
func NewProfessionRaft ¶
func NewProfessionRaft(IProfessionsData eosc.IProfessions) *ProfessionRaft
func (*ProfessionRaft) Append ¶ added in v0.3.0
func (p *ProfessionRaft) Append(cmd string, data []byte) error
func (*ProfessionRaft) CommitHandler ¶
func (p *ProfessionRaft) CommitHandler(cmd string, data []byte) error
func (*ProfessionRaft) Complete ¶ added in v0.3.0
func (p *ProfessionRaft) Complete() error
func (*ProfessionRaft) Delete ¶
func (p *ProfessionRaft) Delete(name string) error
func (*ProfessionRaft) ProcessHandler ¶
func (p *ProfessionRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
func (*ProfessionRaft) ResetHandler ¶
func (p *ProfessionRaft) ResetHandler(data []byte) error
func (*ProfessionRaft) Set ¶
func (p *ProfessionRaft) Set(name string, profession *eosc.ProfessionConfig) error
func (*ProfessionRaft) Snapshot ¶
func (p *ProfessionRaft) Snapshot() []byte
type WorkerConfigs ¶ added in v0.3.0
type WorkerConfigs struct {
workers.ITypedWorkers
}
func NewWorkerConfigs ¶ added in v0.3.0
func NewWorkerConfigs() *WorkerConfigs
type WorkerController ¶
type WorkerController struct {
// contains filtered or unexported fields
}
func NewWorkerController ¶
func NewWorkerController(traffic traffic.IController, config *config.Config, extenderSetting extenders.ITypedExtenderSetting, professions eosc.IProfessions, workers *WorkerConfigs, workerServiceProxy *WorkerServiceProxy) *WorkerController
func (*WorkerController) NewWorker ¶
func (wc *WorkerController) NewWorker() error
func (*WorkerController) Stop ¶
func (wc *WorkerController) Stop()
func (*WorkerController) WaitStart ¶ added in v0.3.1
func (wc *WorkerController) WaitStart()
type WorkerProcess ¶
type WorkerProcess struct {
// contains filtered or unexported fields
}
func (*WorkerProcess) Close ¶
func (w *WorkerProcess) Close() error
type WorkerServiceProxy ¶ added in v0.3.0
type WorkerServiceProxy struct {
// contains filtered or unexported fields
}
func NewWorkerServiceProxy ¶ added in v0.3.0
func NewWorkerServiceProxy() *WorkerServiceProxy
func (*WorkerServiceProxy) AddExtender ¶ added in v0.3.0
func (wc *WorkerServiceProxy) AddExtender(ctx context.Context, in *service.WorkerAddExtender, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) DelExtenderCheck ¶ added in v0.3.0
func (wc *WorkerServiceProxy) DelExtenderCheck(ctx context.Context, in *service.WorkerDelExtender, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) Delete ¶ added in v0.3.0
func (wc *WorkerServiceProxy) Delete(ctx context.Context, in *service.WorkerDeleteRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) DeleteCheck ¶ added in v0.3.0
func (wc *WorkerServiceProxy) DeleteCheck(ctx context.Context, in *service.WorkerDeleteRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) GetWorkerProcess ¶ added in v0.3.0
func (wc *WorkerServiceProxy) GetWorkerProcess() service.WorkerServiceClient
func (*WorkerServiceProxy) Ping ¶ added in v0.3.0
func (wc *WorkerServiceProxy) Ping(ctx context.Context, in *service.WorkerHelloRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) Reset ¶ added in v0.3.0
func (wc *WorkerServiceProxy) Reset(ctx context.Context, in *service.ResetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) Set ¶ added in v0.3.0
func (wc *WorkerServiceProxy) Set(ctx context.Context, in *service.WorkerSetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) SetCheck ¶ added in v0.3.0
func (wc *WorkerServiceProxy) SetCheck(ctx context.Context, in *service.WorkerSetRequest, opts ...grpc.CallOption) (*service.WorkerResponse, error)
func (*WorkerServiceProxy) SetWorkerProcess ¶ added in v0.3.0
func (wc *WorkerServiceProxy) SetWorkerProcess(client service.WorkerServiceClient)
func (*WorkerServiceProxy) Status ¶ added in v0.3.0
func (wc *WorkerServiceProxy) Status(ctx context.Context, in *service.StatusRequest, opts ...grpc.CallOption) (*service.StatusResponse, error)
type WorkersRaft ¶
type WorkersRaft struct {
// contains filtered or unexported fields
}
func NewWorkersRaft ¶
func NewWorkersRaft(WorkerConfig *WorkerConfigs, professions eosc.IProfessions, workerServiceClient service.WorkerServiceClient, service raft_service.IService) *WorkersRaft
func (*WorkersRaft) Append ¶ added in v0.3.0
func (w *WorkersRaft) Append(cmd string, data []byte) error
func (*WorkersRaft) CommitHandler ¶
func (w *WorkersRaft) CommitHandler(cmd string, data []byte) error
func (*WorkersRaft) Complete ¶ added in v0.3.0
func (w *WorkersRaft) Complete() error
func (*WorkersRaft) GetList ¶
func (w *WorkersRaft) GetList(profession string) ([]eosc.TWorker, error)
func (*WorkersRaft) ProcessHandler ¶
func (w *WorkersRaft) ProcessHandler(cmd string, body []byte) ([]byte, interface{}, error)
func (*WorkersRaft) ResetHandler ¶
func (w *WorkersRaft) ResetHandler(data []byte) error
func (*WorkersRaft) Snapshot ¶
func (w *WorkersRaft) Snapshot() []byte
Source Files
¶
Click to show internal directories.
Click to hide internal directories.