Documentation ¶
Index ¶
- Variables
- type PrintRunner
- func (r PrintRunner) Apply(stdin []byte, ns string) ([]byte, error)
- func (r PrintRunner) ClusterInfo() ([]byte, error)
- func (r PrintRunner) Create(stdin []byte, ns string) ([]byte, error)
- func (r PrintRunner) Delete(name, ktype, ns string) ([]byte, error)
- func (r PrintRunner) Get(stdin []byte, ns string) ([]byte, error)
- type RealRunner
- func (r RealRunner) Apply(stdin []byte, ns string) ([]byte, error)
- func (r RealRunner) ClusterInfo() ([]byte, error)
- func (r RealRunner) Create(stdin []byte, ns string) ([]byte, error)
- func (r RealRunner) Delete(name, ktype, ns string) ([]byte, error)
- func (r RealRunner) Get(stdin []byte, ns string) ([]byte, error)
- type Runner
Constants ¶
This section is empty.
Variables ¶
View Source
var Path = "kubectl"
Path is the path of the kubectl binary
Functions ¶
This section is empty.
Types ¶
type PrintRunner ¶
type PrintRunner struct{}
PrintRunner implements Runner to return a []byte of the command to be executed
func (PrintRunner) Apply ¶
func (r PrintRunner) Apply(stdin []byte, ns string) ([]byte, error)
Apply returns the commands to kubectl
func (PrintRunner) ClusterInfo ¶
func (r PrintRunner) ClusterInfo() ([]byte, error)
ClusterInfo returns the commands to kubectl
func (PrintRunner) Create ¶
func (r PrintRunner) Create(stdin []byte, ns string) ([]byte, error)
Create returns the commands to kubectl
type RealRunner ¶
type RealRunner struct{}
RealRunner implements Runner to execute kubectl commands
func (RealRunner) Apply ¶
func (r RealRunner) Apply(stdin []byte, ns string) ([]byte, error)
Apply uploads a chart to Kubernetes
func (RealRunner) ClusterInfo ¶
func (r RealRunner) ClusterInfo() ([]byte, error)
ClusterInfo returns Kubernetes cluster info
func (RealRunner) Create ¶
func (r RealRunner) Create(stdin []byte, ns string) ([]byte, error)
Create uploads a chart to Kubernetes
type Runner ¶
type Runner interface { // ClusterInfo returns Kubernetes cluster info ClusterInfo() ([]byte, error) // Apply updates or uploads a chart to Kubernetes Apply([]byte, string) ([]byte, error) // Create uploads a chart to Kubernetes Create([]byte, string) ([]byte, error) // Delete removes a chart from Kubernetes. Delete(string, string, string) ([]byte, error) // Get returns Kubernetes resources Get([]byte, string) ([]byte, error) }
Runner is an interface to wrap kubectl convenience methods
var Client Runner = RealRunner{}
Client stores the instance of Runner
Click to show internal directories.
Click to hide internal directories.