Documentation
¶
Index ¶
- type ServingJobPrinter
- func (sjp ServingJobPrinter) GetJson() ([]byte, error)
- func (sjp ServingJobPrinter) GetName() string
- func (sjp ServingJobPrinter) GetNamespace() string
- func (sjp ServingJobPrinter) GetType() string
- func (sjp ServingJobPrinter) GetVersion() string
- func (sjp ServingJobPrinter) GetYaml() ([]byte, error)
- type SimplePod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServingJobPrinter ¶
type ServingJobPrinter struct {
serving.Serving `yaml:",inline"`
Desired int32 `yaml:"desired" json:"desired"`
Available int32 `yaml:"available" json:"available"`
Age string `yaml:"serving_duration" json:"serving_duration"`
EndpointAddress string `yaml:"endpoint_address" json:"endpoint_address"`
EndpointPorts string `yaml:"endpoint_ports" json:"endpoint_ports"`
Pods []SimplePod `yaml:"instances" json:"instances"`
}
define the serving job printer
func NewServingJobPrinter ¶
func NewServingJobPrinter(job servejob.Serving) ServingJobPrinter
create the printer
func (ServingJobPrinter) GetJson ¶
func (sjp ServingJobPrinter) GetJson() ([]byte, error)
output the printer with json format
func (ServingJobPrinter) GetName ¶
func (sjp ServingJobPrinter) GetName() string
get the name of printer
func (ServingJobPrinter) GetNamespace ¶
func (sjp ServingJobPrinter) GetNamespace() string
get the namespace of printer
func (ServingJobPrinter) GetType ¶
func (sjp ServingJobPrinter) GetType() string
get the serving type of printer
func (ServingJobPrinter) GetVersion ¶
func (sjp ServingJobPrinter) GetVersion() string
get the version of printer
func (ServingJobPrinter) GetYaml ¶
func (sjp ServingJobPrinter) GetYaml() ([]byte, error)
output the printer with yaml format
type SimplePod ¶
type SimplePod struct {
PodName string `yaml:"pod_name" json:"pod_name"` // selfLink
// how long the pod is running
Age string `yaml:"age" json:"age"`
// pod' status,there is "Running" and "Pending"
Status string `yaml:"status" json:"status"`
// the node ip
HostIP string `yaml:"host_ip" json:"host_ip"`
Ready string `yaml:"ready" json:"ready"`
RestartCount string `yaml:"restart_count" json:"restart_count"`
}
define the simple pod information
Click to show internal directories.
Click to hide internal directories.