list

package
v1.33.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobJSONOutput added in v1.16.0

type JobJSONOutput struct {
	Jobs []*config.Workload `json:"jobs"`
}

JobJSONOutput is the output struct for job list.

type JobListWriter

type JobListWriter struct {
	// Output configuration options.
	ShowLocalJobs bool
	OutputJSON    bool

	Store Store     // Client to retrieve application configuration and job metadata.
	Ws    Workspace // Client to retrieve local jobs.
	Out   io.Writer // The writer where output will be written.
}

JobListWriter holds all the metadata and clients needed to list all jobs in a given workspace or app in a human- or machine-readable format.

func (*JobListWriter) Write

func (l *JobListWriter) Write(appName string) error

Jobs lists all jobs, either locally or in the workspace, and writes the output to a writer.

type ServiceJSONOutput added in v1.16.0

type ServiceJSONOutput struct {
	Services []*config.Workload `json:"services"`
}

ServiceJSONOutput is the output struct for service list.

type Store

type Store interface {
	GetApplication(appName string) (*config.Application, error)
	ListJobs(appName string) ([]*config.Workload, error)
	ListServices(appName string) ([]*config.Workload, error)
}

Store wraps the methods required for interacting with config stores.

type SvcListWriter

type SvcListWriter struct {
	ShowLocalSvcs bool
	OutputJSON    bool

	Store Store     // Client to retrieve application configuration and service metadata.
	Ws    Workspace // Client to retrieve local jobs.
	Out   io.Writer // The writer where output will be written.
}

SvcListWriter holds all the metadata and clients needed to list all services in a given workspace or app in a human- or machine-readable format.

func (*SvcListWriter) Write

func (l *SvcListWriter) Write(appName string) error

Write lists all services, either locally or in the workspace, and writes the output to a writer.

type Workspace

type Workspace interface {
	ListJobs() ([]string, error)
	ListServices() ([]string, error)
}

Workspace wraps the methods required to interact with a local workspace.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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