printer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServingJobPrinter

type ServingJobPrinter struct {
	atypes.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(client *kubernetes.Clientset, deploy app_v1.Deployment, allPods []v1.Pod) 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

func (ServingJobPrinter) IsMatchedGivenNamespace

func (sjp ServingJobPrinter) IsMatchedGivenNamespace(namespace string) bool

is matched the given namespace?

func (ServingJobPrinter) IsMatchedGivenType

func (sjp ServingJobPrinter) IsMatchedGivenType(servingType string) bool

is match the given type?

func (ServingJobPrinter) IsMatchedGivenVersion

func (sjp ServingJobPrinter) IsMatchedGivenVersion(version string) bool

is matched the given verison ?

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

Jump to

Keyboard shortcuts

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