Documentation ¶
Index ¶
- func CheckTaskPermission(ctx context.Context, resourceId string) (*models.Task, error)
- func CheckTasksPermission(ctx context.Context, resourceIds []string) ([]*models.Task, error)
- func Serve(cfg *config.Config)
- type Controller
- func (c *Controller) ExtractTasks(ctx context.Context)
- func (c *Controller) GetTaskLength() int32
- func (c *Controller) HandleTask(ctx context.Context, taskId string, cb func()) error
- func (c *Controller) HandleTasks(ctx context.Context)
- func (c *Controller) IsRunningExceed() bool
- func (c *Controller) Serve(ctx context.Context)
- func (c *Controller) UpdateWorkingTasks(ctx context.Context) error
- type Processor
- type Server
- func (p *Server) CreateTask(ctx context.Context, req *pb.CreateTaskRequest) (*pb.CreateTaskResponse, error)
- func (p *Server) DescribeTasks(ctx context.Context, req *pb.DescribeTasksRequest) (*pb.DescribeTasksResponse, error)
- func (p *Server) RetryTasks(ctx context.Context, req *pb.RetryTasksRequest) (*pb.RetryTasksResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTaskPermission ¶ added in v0.2.3
func CheckTasksPermission ¶ added in v0.2.3
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(hostname string) *Controller
func (*Controller) ExtractTasks ¶
func (c *Controller) ExtractTasks(ctx context.Context)
func (*Controller) GetTaskLength ¶
func (c *Controller) GetTaskLength() int32
func (*Controller) HandleTask ¶
func (c *Controller) HandleTask(ctx context.Context, taskId string, cb func()) error
func (*Controller) HandleTasks ¶
func (c *Controller) HandleTasks(ctx context.Context)
func (*Controller) IsRunningExceed ¶
func (c *Controller) IsRunningExceed() bool
func (*Controller) Serve ¶
func (c *Controller) Serve(ctx context.Context)
func (*Controller) UpdateWorkingTasks ¶ added in v0.2.3
func (c *Controller) UpdateWorkingTasks(ctx context.Context) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CreateTask ¶
func (p *Server) CreateTask(ctx context.Context, req *pb.CreateTaskRequest) (*pb.CreateTaskResponse, error)
func (*Server) DescribeTasks ¶
func (p *Server) DescribeTasks(ctx context.Context, req *pb.DescribeTasksRequest) (*pb.DescribeTasksResponse, error)
func (*Server) RetryTasks ¶
func (p *Server) RetryTasks(ctx context.Context, req *pb.RetryTasksRequest) (*pb.RetryTasksResponse, error)
Click to show internal directories.
Click to hide internal directories.