Documentation ¶
Index ¶
- Constants
- func AddCommonFlags(cmd *cobra.Command)
- func GetBind(cmd *cobra.Command) (string, error)
- func NewCompletionCommand(f Factory) *cobra.Command
- func NewGetCommand(f Factory) *cobra.Command
- func NewVersionCommand(f Factory) *cobra.Command
- func NewWatchCommand(f Factory) *cobra.Command
- func RunAlias(f Factory, cmd *cobra.Command, args []string) error
- func RunCommon(cmd *cobra.Command) error
- func RunGet(f Factory, cmd *cobra.Command, args []string) error
- func RunWatch(f Factory, cmd *cobra.Command, args []string) error
- type Cluster
- type ClusterWrap
- type Config
- type Context
- type ContextWrap
- type DefaultFactory
- func (f *DefaultFactory) HomeKubeconfig() (Config, error)
- func (f *DefaultFactory) KubeClient(config *Config) KubeClient
- func (f *DefaultFactory) MrrCache() *MrrCache
- func (f *DefaultFactory) MrrClient(address string) (MrrClient, error)
- func (f *DefaultFactory) Serve(l net.Listener, cache *MrrCache) error
- func (f *DefaultFactory) StdOut() io.Writer
- type DefaultKubeClient
- type EventType
- type Factory
- type KubeClient
- type KubeObject
- type KubeServer
- type KubeServers
- type KubectlFlags
- type MrrCache
- type MrrClient
- type MrrClientDefault
- type MrrFilter
- type ObjectEvent
- type ObjectList
- type ObjectMeta
- type TestFactory
- func (f *TestFactory) HomeKubeconfig() (Config, error)
- func (f *TestFactory) KubeClient(config *Config) KubeClient
- func (f *TestFactory) MrrCache() *MrrCache
- func (f *TestFactory) MrrClient(address string) (MrrClient, error)
- func (f *TestFactory) Serve(l net.Listener, cache *MrrCache) error
- func (f *TestFactory) StdOut() io.Writer
- type TestKubeClient
- type TestMirrorClient
- type TypeMeta
- type User
- type UserWrap
Constants ¶
View Source
const (
VERSION = "1.3.0"
)
Variables ¶
This section is empty.
Functions ¶
func AddCommonFlags ¶
func NewCompletionCommand ¶ added in v0.8.0
func NewGetCommand ¶
func NewVersionCommand ¶
func NewWatchCommand ¶
Types ¶
type ClusterWrap ¶
type Config ¶
type Config struct { Clusters []ClusterWrap `yaml:"clusters"` Contexts []ContextWrap `yaml:"contexts"` Users []UserWrap `yaml:"users"` CurrentContext string `yaml:"current-context"` }
Config represent configuration written in .kube/config file
func NewConfigFromURL ¶ added in v1.2.0
type ContextWrap ¶
type DefaultFactory ¶
type DefaultFactory struct {
// contains filtered or unexported fields
}
func (*DefaultFactory) HomeKubeconfig ¶
func (f *DefaultFactory) HomeKubeconfig() (Config, error)
func (*DefaultFactory) KubeClient ¶
func (f *DefaultFactory) KubeClient(config *Config) KubeClient
func (*DefaultFactory) MrrCache ¶
func (f *DefaultFactory) MrrCache() *MrrCache
func (*DefaultFactory) MrrClient ¶
func (f *DefaultFactory) MrrClient(address string) (MrrClient, error)
func (*DefaultFactory) Serve ¶
func (f *DefaultFactory) Serve(l net.Listener, cache *MrrCache) error
func (*DefaultFactory) StdOut ¶
func (f *DefaultFactory) StdOut() io.Writer
type DefaultKubeClient ¶
type DefaultKubeClient struct {
// contains filtered or unexported fields
}
func (*DefaultKubeClient) GetObjects ¶ added in v0.9.0
func (kc *DefaultKubeClient) GetObjects(kind string) ([]KubeObject, error)
func (*DefaultKubeClient) Ping ¶ added in v1.2.1
func (kc *DefaultKubeClient) Ping() error
func (*DefaultKubeClient) Server ¶
func (kc *DefaultKubeClient) Server() KubeServer
func (*DefaultKubeClient) WatchObjects ¶
func (kc *DefaultKubeClient) WatchObjects(kind string, out chan *ObjectEvent) error
type Factory ¶
type KubeClient ¶
type KubeClient interface { Server() KubeServer Ping() error WatchObjects(kind string, out chan *ObjectEvent) error GetObjects(kind string) ([]KubeObject, error) }
func NewKubeClient ¶
func NewKubeClient(config *Config) KubeClient
NewKubeClient returns a client that talks to Kubenetes API server. It talks to only one server, and uses configuration of the current context in the given config
type KubeObject ¶
type KubeObject struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` }
type KubeServer ¶
type KubeServer struct {
URL string
}
KubeServer represents a Kubernetes API server which we ask for information
type KubeServers ¶ added in v1.0.0
type KubeServers []KubeServer
func (KubeServers) Len ¶ added in v1.0.0
func (s KubeServers) Len() int
func (KubeServers) Less ¶ added in v1.0.0
func (s KubeServers) Less(i, j int) bool
func (KubeServers) Swap ¶ added in v1.0.0
func (s KubeServers) Swap(i, j int)
type KubectlFlags ¶ added in v0.8.0
type KubectlFlags struct {
// contains filtered or unexported fields
}
type MrrCache ¶
type MrrCache struct {
// contains filtered or unexported fields
}
func NewMrrCache ¶
func NewMrrCache() *MrrCache
type MrrClient ¶
type MrrClient interface {
Objects(f MrrFilter) ([]KubeObject, error)
}
type MrrClientDefault ¶
type MrrClientDefault struct {
// contains filtered or unexported fields
}
func NewMrrClient ¶
func NewMrrClient(address string) (*MrrClientDefault, error)
func (*MrrClientDefault) Objects ¶
func (mc *MrrClientDefault) Objects(f MrrFilter) ([]KubeObject, error)
type ObjectEvent ¶
type ObjectEvent struct { Type EventType `json:"type"` Object *KubeObject `json:"object"` }
type ObjectList ¶ added in v0.9.0
type ObjectList struct {
Objects []KubeObject `json:"items"`
}
type ObjectMeta ¶
type TestFactory ¶
type TestFactory struct {
// contains filtered or unexported fields
}
func NewTestFactory ¶
func NewTestFactory() *TestFactory
func (*TestFactory) HomeKubeconfig ¶
func (f *TestFactory) HomeKubeconfig() (Config, error)
func (*TestFactory) KubeClient ¶
func (f *TestFactory) KubeClient(config *Config) KubeClient
func (*TestFactory) MrrCache ¶
func (f *TestFactory) MrrCache() *MrrCache
func (*TestFactory) StdOut ¶
func (f *TestFactory) StdOut() io.Writer
type TestKubeClient ¶
type TestKubeClient struct {
// contains filtered or unexported fields
}
func NewTestKubeClient ¶
func NewTestKubeClient() *TestKubeClient
func (*TestKubeClient) GetObjects ¶ added in v0.9.0
func (kc *TestKubeClient) GetObjects(kind string) ([]KubeObject, error)
func (*TestKubeClient) Ping ¶ added in v1.2.1
func (kc *TestKubeClient) Ping() error
func (*TestKubeClient) Server ¶
func (kc *TestKubeClient) Server() KubeServer
func (*TestKubeClient) WatchObjects ¶
func (kc *TestKubeClient) WatchObjects(kind string, out chan *ObjectEvent) error
type TestMirrorClient ¶
type TestMirrorClient struct {
// contains filtered or unexported fields
}
func (*TestMirrorClient) Objects ¶
func (mc *TestMirrorClient) Objects(f MrrFilter) ([]KubeObject, error)
Click to show internal directories.
Click to hide internal directories.