termdash

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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) Nodes

func (ts *TaskSource) Nodes() ([]*scheduler.Node, error)

func (*TaskSource) PreviousPageToken

func (ts *TaskSource) PreviousPageToken() string

func (*TaskSource) TaskWorkers

func (ts *TaskSource) TaskWorkers() ([]taskWorker, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL