Documentation
¶
Index ¶
- Variables
- func SortFields() []string
- type TaskSource
- func (ts *TaskSource) Cancel(id string) error
- func (ts *TaskSource) Get(id string) (*tes.Task, error)
- func (ts *TaskSource) List(previous, next bool, sortField string, sortReversed, allTasks bool, ...) ([]*tes.Task, error)
- func (ts *TaskSource) NextPageToken() string
- func (ts *TaskSource) Nodes() ([]*scheduler.Node, error)
- func (ts *TaskSource) PreviousPageToken() string
- func (ts *TaskSource) TaskWorkers() ([]taskWorker, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "dashboard", Short: "Start a Funnel dashboard in your terminal.", PersistentPreRun: func(cmd *cobra.Command, args []string) { if tesServer == "" { if val := os.Getenv("FUNNEL_SERVER"); val != "" { tesServer = val } else { tesServer = defaultTesServer } } }, Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { return termdash(tesServer) }, }
Cmd represents the dashboard command.
View Source
var Sorters = map[string]sortMethod{ "id": func(c1, c2 *tes.Task) bool { return c1.Id < c2.Id }, "state": func(c1, c2 *tes.Task) bool { if c1.State.String() == c2.State.String() { return c1.Name < c2.Name } return c1.State.String() < c2.State.String() }, "name": func(c1, c2 *tes.Task) bool { return c1.Name < c2.Name }, "description": func(c1, c2 *tes.Task) bool { return c1.Description < c2.Description }, }
Functions ¶
func SortFields ¶
func SortFields() []string
Types ¶
type TaskSource ¶
type TaskSource struct {
// contains filtered or unexported fields
}
TaskSource fetches tasks from a Funnel server, tracking pagination state.
func NewTaskSource ¶
func NewTaskSource(tesHTTPServerAddress string, pageSize int32) (*TaskSource, error)
func (*TaskSource) Cancel ¶
func (ts *TaskSource) Cancel(id string) error
func (*TaskSource) Get ¶
func (ts *TaskSource) Get(id string) (*tes.Task, error)
Get fetches a single task with its full view.
func (*TaskSource) List ¶
func (ts *TaskSource) List(previous, next bool, sortField string, sortReversed, allTasks bool, filter string) ([]*tes.Task, error)
List returns the current page of tasks, sorted and filtered.
func (*TaskSource) NextPageToken ¶
func (ts *TaskSource) NextPageToken() string
func (*TaskSource) PreviousPageToken ¶
func (ts *TaskSource) PreviousPageToken() string
func (*TaskSource) TaskWorkers ¶
func (ts *TaskSource) TaskWorkers() ([]taskWorker, error)
Click to show internal directories.
Click to hide internal directories.