Documentation
¶
Index ¶
- type AgentServer
- func (a *AgentServer) AllowReadWrite(context.Context, *pb.AllowReadWriteRequest) (*pb.AllowReadWriteResponse, error)
- func (a *AgentServer) BanReadWrite(context.Context, *pb.BanReadWriteRequest) (*pb.BanReadWriteResponse, error)
- func (a *AgentServer) DataPlayBack(ctx context.Context, req *pb.DataPlayBackRequest) (*pb.DataPlayBackResponse, error)
- func (a *AgentServer) GetSpaceUsages(ctx context.Context, req *pb.GetSpaceUsagesRequest) (*pb.GetSpaceUsagesResponse, error)
- func (a *AgentServer) HealthCheck(ctx context.Context, req *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
- func (a *AgentServer) ServiceStatus(ctx context.Context, req *pb.ServiceStatusRequest) (*pb.ServiceStatusResponse, error)
- func (a *AgentServer) StartService(ctx context.Context, req *pb.StartServiceRequest) (*pb.StartServiceResponse, error)
- func (a *AgentServer) StopAgent(ctx context.Context, req *pb.StopAgentRequest) (*pb.StopAgentResponse, error)
- func (a *AgentServer) StopService(ctx context.Context, req *pb.StopServiceRequest) (*pb.StopServiceResponse, error)
- type StorageServer
- func (ss *StorageServer) DownloadFile(ctx context.Context, req *pb.DownloadFileRequest) (*pb.DownloadFileResponse, error)
- func (ss *StorageServer) ExistDir(ctx context.Context, req *pb.ExistDirRequest) (*pb.ExistDirResponse, error)
- func (ss *StorageServer) IncrUploadFile(ctx context.Context, req *pb.IncrUploadFileRequest) (*pb.IncrUploadFileResponse, error)
- func (ss *StorageServer) MoveDir(ctx context.Context, req *pb.MoveDirRequest) (*pb.MoveDirResponse, error)
- func (ss *StorageServer) RemoveDir(ctx context.Context, req *pb.RemoveDirRequest) (*pb.RemoveDirResponse, error)
- func (ss *StorageServer) UploadFile(ctx context.Context, req *pb.UploadFileRequest) (*pb.UploadFileResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentServer ¶
type AgentServer struct {
// contains filtered or unexported fields
}
AgentServer act as an agent to interactive with services in agent machine
func NewAgent ¶
func NewAgent(metaConfig *clients.MetaConfig) (*AgentServer, error)
func (*AgentServer) AllowReadWrite ¶
func (a *AgentServer) AllowReadWrite(context.Context, *pb.AllowReadWriteRequest) (*pb.AllowReadWriteResponse, error)
TODO(spw): should call graphd's corresponding interface
func (*AgentServer) BanReadWrite ¶
func (a *AgentServer) BanReadWrite(context.Context, *pb.BanReadWriteRequest) (*pb.BanReadWriteResponse, error)
TODO(spw): should call graphd's corresponding interface
func (*AgentServer) DataPlayBack ¶
func (a *AgentServer) DataPlayBack(ctx context.Context, req *pb.DataPlayBackRequest) (*pb.DataPlayBackResponse, error)
func (*AgentServer) GetSpaceUsages ¶ added in v3.6.1
func (a *AgentServer) GetSpaceUsages(ctx context.Context, req *pb.GetSpaceUsagesRequest) (*pb.GetSpaceUsagesResponse, error)
func (*AgentServer) HealthCheck ¶
func (a *AgentServer) HealthCheck(ctx context.Context, req *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
func (*AgentServer) ServiceStatus ¶
func (a *AgentServer) ServiceStatus(ctx context.Context, req *pb.ServiceStatusRequest) (*pb.ServiceStatusResponse, error)
ServiceStatus return the status(exit or running) of metad/storaged/graphd/all service in agent machine
func (*AgentServer) StartService ¶
func (a *AgentServer) StartService(ctx context.Context, req *pb.StartServiceRequest) (*pb.StartServiceResponse, error)
StartService start metad/storaged/graphd/all service in agent machine
func (*AgentServer) StopAgent ¶
func (a *AgentServer) StopAgent(ctx context.Context, req *pb.StopAgentRequest) (*pb.StopAgentResponse, error)
func (*AgentServer) StopService ¶
func (a *AgentServer) StopService(ctx context.Context, req *pb.StopServiceRequest) (*pb.StopServiceResponse, error)
StartService stop metad/storaged/graphd/all service in agent machine
type StorageServer ¶
type StorageServer struct {
// contains filtered or unexported fields
}
StorageServer provide service:
- upload/download dir/files between the agent machine and external storage
- handle dir/files in agent machine
func NewStorage ¶
func NewStorage() *StorageServer
func (*StorageServer) DownloadFile ¶
func (ss *StorageServer) DownloadFile(ctx context.Context, req *pb.DownloadFileRequest) (*pb.DownloadFileResponse, error)
DownloadFile download the file or directory recursively from external storage to agent machine
func (*StorageServer) ExistDir ¶
func (ss *StorageServer) ExistDir(ctx context.Context, req *pb.ExistDirRequest) (*pb.ExistDirResponse, error)
ExistDir check if file/dir in agent machine
func (*StorageServer) IncrUploadFile ¶
func (ss *StorageServer) IncrUploadFile(ctx context.Context, req *pb.IncrUploadFileRequest) (*pb.IncrUploadFileResponse, error)
IncrUploadFile upload the Incremental file or directory recursively from agent machine to external storage
func (*StorageServer) MoveDir ¶
func (ss *StorageServer) MoveDir(ctx context.Context, req *pb.MoveDirRequest) (*pb.MoveDirResponse, error)
MoveDir rename file/dir in agent machine
func (*StorageServer) RemoveDir ¶
func (ss *StorageServer) RemoveDir(ctx context.Context, req *pb.RemoveDirRequest) (*pb.RemoveDirResponse, error)
RemoveDir delete file/dir in agent machine
func (*StorageServer) UploadFile ¶
func (ss *StorageServer) UploadFile(ctx context.Context, req *pb.UploadFileRequest) (*pb.UploadFileResponse, error)
UploadFile upload the file or directory recursively from agent machine to external storage