Documentation
¶
Overview ¶
Package cmdutil provides helper utilities and interfaces for working with command line tools
Index ¶
- func ConvertKVStringsToMap(values []string) map[string]string
- func FormatDuration(d time.Duration) string
- func FormatPhase(phase string) string
- func ReadKVStringsMapFromLabel(labels []string) map[string]string
- func Watch(ctx context.Context, id string, wf WatchFunc) error
- type Codec
- type Deserializer
- type JSONCodec
- type JSONDeserializer
- type JSONSerializer
- type OutputFormat
- type Serializer
- type StopFunc
- type SyncWriter
- type TableSerializer
- type WatchFunc
- type YamlCodec
- type YamlDeserializer
- type YamlSerializer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertKVStringsToMap ¶
ConvertKVStringsToMap converts a slice of "key=value" strings into a map.
func FormatDuration ¶
func FormatPhase ¶
func ReadKVStringsMapFromLabel ¶
ReadKVStringsMapFromLabel convers string slice into map
Types ¶
type Codec ¶
type Codec interface {
Serializer
Deserializer
}
func NewJSONCodec ¶
func NewJSONCodec() Codec
func NewYamlCodec ¶
func NewYamlCodec() Codec
type Deserializer ¶
func DeserializerFor ¶
func DeserializerFor(s string) (Deserializer, error)
type JSONCodec ¶
type JSONCodec struct {
*JSONSerializer
*JSONDeserializer
}
type JSONDeserializer ¶
type JSONDeserializer struct{}
func (*JSONDeserializer) Deserialize ¶
func (d *JSONDeserializer) Deserialize(b []byte, m proto.Message) error
type JSONSerializer ¶
type JSONSerializer struct{}
type OutputFormat ¶
type OutputFormat string
var ( OutputFormatJSON OutputFormat = "json" OutputFormatYAML OutputFormat = "yaml" OutputFormatTable OutputFormat = "table" )
type Serializer ¶
func SerializerFor ¶
func SerializerFor(s string) (Serializer, error)
type SyncWriter ¶
type SyncWriter struct {
// contains filtered or unexported fields
}
type TableSerializer ¶
type TableSerializer struct{}
type YamlCodec ¶
type YamlCodec struct {
*YamlSerializer
*YamlDeserializer
}
type YamlDeserializer ¶
type YamlDeserializer struct{}
func (*YamlDeserializer) Deserialize ¶
func (d *YamlDeserializer) Deserialize(b []byte, m proto.Message) error
type YamlSerializer ¶
type YamlSerializer struct{}
Click to show internal directories.
Click to hide internal directories.