Documentation ¶
Index ¶
- Constants
- func GenerateEngineName(name string) string
- type Engine
- func (e *Engine) GetListen() string
- func (e *Engine) Log(srv rpc.EngineManagerService_EngineLogServer) error
- func (e *Engine) ProcessStatus() *rpc.ProcessStatus
- func (e *Engine) SetListen(listen string)
- func (e *Engine) Start() error
- func (e *Engine) Stop() (*rpc.ProcessResponse, error)
- func (e *Engine) WaitForDeletion() error
- func (e *Engine) WaitForRunning() error
- type Launcher
- func (el *Launcher) FrontendShutdown() error
- func (el *Launcher) FrontendShutdownCallback() (int, error)
- func (el *Launcher) FrontendStart(frontend string) error
- func (el *Launcher) FrontendStartCallback(tID int) error
- func (el *Launcher) GetEngineName() string
- func (el *Launcher) GetLauncherName() string
- func (el *Launcher) IsSCSIDeviceEnabled() bool
- func (el *Launcher) IsUpgrading() bool
- func (el *Launcher) Log(srv rpc.EngineManagerService_EngineLogServer) error
- func (el *Launcher) PrepareUpgrade(spec *rpc.EngineSpec) (string, error)
- func (el *Launcher) RPCResponse() *rpc.EngineResponse
- func (el *Launcher) Start() error
- func (el *Launcher) Stop() error
- func (el *Launcher) Update()
- func (el *Launcher) Upgrade() error
- func (el *Launcher) WaitForDeletion() error
- func (el *Launcher) WaitForRunning() error
- type Manager
- func (em *Manager) EngineCreate(ctx context.Context, req *rpc.EngineCreateRequest) (ret *rpc.EngineResponse, err error)
- func (em *Manager) EngineDelete(ctx context.Context, req *rpc.EngineRequest) (ret *rpc.EngineResponse, err error)
- func (em *Manager) EngineGet(ctx context.Context, req *rpc.EngineRequest) (ret *rpc.EngineResponse, err error)
- func (em *Manager) EngineList(ctx context.Context, req *empty.Empty) (ret *rpc.EngineListResponse, err error)
- func (em *Manager) EngineLog(req *rpc.LogRequest, srv rpc.EngineManagerService_EngineLogServer) error
- func (em *Manager) EngineUpgrade(ctx context.Context, req *rpc.EngineUpgradeRequest) (ret *rpc.EngineResponse, err error)
- func (em *Manager) EngineWatch(req *empty.Empty, srv rpc.EngineManagerService_EngineWatchServer) (err error)
- func (em *Manager) FrontendShutdown(ctx context.Context, req *rpc.EngineRequest) (ret *empty.Empty, err error)
- func (em *Manager) FrontendShutdownCallback(ctx context.Context, req *rpc.EngineRequest) (ret *empty.Empty, err error)
- func (em *Manager) FrontendStart(ctx context.Context, req *rpc.FrontendStartRequest) (ret *empty.Empty, err error)
- func (em *Manager) FrontendStartCallback(ctx context.Context, req *rpc.EngineRequest) (ret *empty.Empty, err error)
- func (em *Manager) StartMonitoring()
- type MockDeviceCreator
- type MockDeviceService
- func (mds *MockDeviceService) Enabled() bool
- func (mds *MockDeviceService) FinishUpgrade() error
- func (mds *MockDeviceService) GetEndpoint() string
- func (mds *MockDeviceService) GetFrontend() string
- func (mds *MockDeviceService) PrepareUpgrade() error
- func (mds *MockDeviceService) SetFrontend(frontend string) error
- func (mds *MockDeviceService) Shutdown() (int, error)
- func (mds *MockDeviceService) Start(tID int) error
- func (mds *MockDeviceService) UnsetFrontend()
- func (mds *MockDeviceService) UnsetFrontendCheck() error
- type MockVolumeClient
- type VolumeClient
- type VolumeClientService
Constants ¶
View Source
const (
MaxTgtTargetNumber = 4096
)
Variables ¶
This section is empty.
Functions ¶
func GenerateEngineName ¶
Types ¶
type Engine ¶
type Engine struct { EngineName string Size int64 Binary string Replicas []string VolumeName string LauncherName string LauncherAddr string ListenIP string Frontend string Backends []string StatusLock *sync.RWMutex Listen string // contains filtered or unexported fields }
func NewEngine ¶
func NewEngine(spec *rpc.EngineSpec, launcherAddr string, pm rpc.ProcessManagerServiceServer, ec VolumeClientService) *Engine
func (*Engine) ProcessStatus ¶
func (e *Engine) ProcessStatus() *rpc.ProcessStatus
func (*Engine) WaitForDeletion ¶
func (*Engine) WaitForRunning ¶
type Launcher ¶
type Launcher struct { UUID string LauncherName string LauncherAddr string VolumeName string ListenIP string Size int64 Backends []string // contains filtered or unexported fields }
func NewEngineLauncher ¶
func NewEngineLauncher(spec *rpc.EngineSpec, launcherAddr string, engineUpdateCh chan *Launcher, processManager rpc.ProcessManagerServiceServer, dc longhorndev.DeviceCreator, ec VolumeClientService) (*Launcher, error)
func (*Launcher) FrontendShutdown ¶
func (*Launcher) FrontendShutdownCallback ¶
func (*Launcher) FrontendStart ¶
func (*Launcher) FrontendStartCallback ¶
func (*Launcher) GetEngineName ¶
func (*Launcher) GetLauncherName ¶
func (*Launcher) IsSCSIDeviceEnabled ¶
func (*Launcher) IsUpgrading ¶
func (*Launcher) PrepareUpgrade ¶
func (el *Launcher) PrepareUpgrade(spec *rpc.EngineSpec) (string, error)
func (*Launcher) RPCResponse ¶
func (el *Launcher) RPCResponse() *rpc.EngineResponse
func (*Launcher) WaitForDeletion ¶
func (*Launcher) WaitForRunning ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewEngineManager ¶
func (*Manager) EngineCreate ¶
func (em *Manager) EngineCreate(ctx context.Context, req *rpc.EngineCreateRequest) (ret *rpc.EngineResponse, err error)
EngineCreate will create an engine according to the request If the specified engine name exists already, the creation will fail.
func (*Manager) EngineDelete ¶
func (em *Manager) EngineDelete(ctx context.Context, req *rpc.EngineRequest) (ret *rpc.EngineResponse, err error)
EngineDelete will delete the engine named by the request If the specified engine doesn't exist, the deletion will return with ErrorNotFound
func (*Manager) EngineGet ¶
func (em *Manager) EngineGet(ctx context.Context, req *rpc.EngineRequest) (ret *rpc.EngineResponse, err error)
EngineGet will get the engine named by the request If the specified engine doesn't exist, the deletion will return with ErrorNotFound
func (*Manager) EngineList ¶
func (*Manager) EngineLog ¶
func (em *Manager) EngineLog(req *rpc.LogRequest, srv rpc.EngineManagerService_EngineLogServer) error
func (*Manager) EngineUpgrade ¶
func (em *Manager) EngineUpgrade(ctx context.Context, req *rpc.EngineUpgradeRequest) (ret *rpc.EngineResponse, err error)
EngineUpgrade will upgrade the engine according to the request If the specified engine doesn't exist, the upgrade will return error
func (*Manager) EngineWatch ¶
func (*Manager) FrontendShutdown ¶
func (*Manager) FrontendShutdownCallback ¶
func (*Manager) FrontendStart ¶
func (*Manager) FrontendStartCallback ¶
func (*Manager) StartMonitoring ¶
func (em *Manager) StartMonitoring()
type MockDeviceCreator ¶
type MockDeviceCreator struct{}
func (*MockDeviceCreator) NewDevice ¶
func (mdc *MockDeviceCreator) NewDevice(name string, size int64, frontend string) (longhorndev.DeviceService, error)
type MockDeviceService ¶
func (*MockDeviceService) Enabled ¶
func (mds *MockDeviceService) Enabled() bool
func (*MockDeviceService) FinishUpgrade ¶
func (mds *MockDeviceService) FinishUpgrade() error
func (*MockDeviceService) GetEndpoint ¶
func (mds *MockDeviceService) GetEndpoint() string
func (*MockDeviceService) GetFrontend ¶
func (mds *MockDeviceService) GetFrontend() string
func (*MockDeviceService) PrepareUpgrade ¶
func (mds *MockDeviceService) PrepareUpgrade() error
func (*MockDeviceService) SetFrontend ¶
func (mds *MockDeviceService) SetFrontend(frontend string) error
func (*MockDeviceService) Shutdown ¶
func (mds *MockDeviceService) Shutdown() (int, error)
func (*MockDeviceService) Start ¶
func (mds *MockDeviceService) Start(tID int) error
func (*MockDeviceService) UnsetFrontend ¶
func (mds *MockDeviceService) UnsetFrontend()
func (*MockDeviceService) UnsetFrontendCheck ¶
func (mds *MockDeviceService) UnsetFrontendCheck() error
type MockVolumeClient ¶
type MockVolumeClient struct {
// contains filtered or unexported fields
}
func (*MockVolumeClient) VolumeFrontendShutdown ¶
func (mc *MockVolumeClient) VolumeFrontendShutdown(addr, launcherName string) error
func (*MockVolumeClient) VolumeFrontendStart ¶
func (mc *MockVolumeClient) VolumeFrontendStart(addr, launcherName, frontend string) error
type VolumeClient ¶
type VolumeClient struct{}
func (*VolumeClient) VolumeFrontendShutdown ¶
func (ec *VolumeClient) VolumeFrontendShutdown(addr, launcherName string) error
func (*VolumeClient) VolumeFrontendStart ¶
func (ec *VolumeClient) VolumeFrontendStart(addr, launcherName, frontend string) error
Click to show internal directories.
Click to hide internal directories.