Documentation ¶
Index ¶
- Constants
- func CompileTOSCA(url string, inputs map[string]ard.Value, writer io.Writer, ...) error
- func CopySSH(host string, username string, key string, reader io.Reader, targetPath string, ...) error
- func CreateEventRecorder(kubernetes kubernetes.Interface, component string, log *logging.Logger) record.EventRecorder
- func DecodeAllYAML(code string) ([]ard.StringMap, error)
- func DecodeYAMLTemplate(code string, data interface{}) (map[string]interface{}, error)
- func ExecSSH(host string, username string, key string, stdin io.Reader, command ...string) (string, error)
- func ExecScriptlet(clout *cloutpkg.Clout, scriptletName string, arguments map[string]string, ...) (string, error)
- func FindResourceForKind(discovery_ discoverypkg.DiscoveryInterface, gvk schema.GroupVersionKind, ...) (schema.GroupVersionResource, error)
- func FindResourceForUnstructured(discovery discoverypkg.DiscoveryInterface, object *unstructured.Unstructured, ...) (schema.GroupVersionResource, error)
- func FindResourcesForKind(discovery discoverypkg.DiscoveryInterface, gvk schema.GroupVersionKind, ...) ([]schema.GroupVersionResource, error)
- func GetConfiguredNamespace(configPath string, context string) (string, bool)
- func GetControllerOf(metaObject meta.Object) (schema.GroupVersionKind, string, error)
- func GetFileHash(path string) (string, error)
- func GetFirstPodIP(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) (string, error)
- func GetFirstPodName(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) (string, error)
- func GetFirstServiceIP(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) (string, error)
- func GetInternalRegistryURL(kubernetesClient kubernetes.Interface) (string, error)
- func GetMetaObject(object interface{}, log *logging.Logger) (meta.Object, error)
- func GetPodIPs(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) ([]string, error)
- func GetPodNames(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) ([]string, error)
- func GetPods(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) (*core.PodList, error)
- func GetServiceAccountNamespace() string
- func GetServiceIPs(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) ([]string, error)
- func GetServices(context contextpkg.Context, kubernetes kubernetespkg.Interface, ...) (*core.ServiceList, error)
- func GetUnstructuredGVK(object *unstructured.Unstructured) (schema.GroupVersionKind, error)
- func Log(kubernetes kubernetespkg.Interface, namespace string, podName string, ...) (io.ReadCloser, error)
- func NewConfig(configPath string, context string) (*rest.Config, error)
- func NewConfigForContext(configPath string, context string) (*rest.Config, error)
- func NewConfigFromFlags(masterUrl string, configPath string, context string, log *logging.Logger) (*rest.Config, error)
- func NewSelfContainedConfig(restConfig *rest.Config, namespace string) (*api.Config, error)
- func NewUnstructuredFromYAMLTemplate(code string, data interface{}) (*unstructured.Unstructured, error)
- func ParseGVK(apiVersion string, kind string) (schema.GroupVersionKind, error)
- func PublishOnRegistry(imageName string, url urlpkg.URL, spooler *spoolerpkg.Client) error
- func PullLayerFromRegistry(imageName string, writer io.Writer, spooler *spoolerpkg.Client) error
- func ReadClout(reader io.Reader, urlContext *urlpkg.Context) (*cloutpkg.Clout, error)
- func ReaderSize(reader io.Reader) (int64, error)
- func SetCobraFlagsFromEnvironment(prefix string, command *cobra.Command)
- func SetControllerOfUnstructured(object *unstructured.Unstructured, controllerObject meta.Object) error
- func SetFlagsFromEnvironment(prefix string)
- func SetupSignalHandler() <-chan struct{}
- func Shell(rest restpkg.Interface, config *restpkg.Config, namespace string, ...) error
- func SortedMapStringStringKeys(map_ map[string]string) []string
- func TarAndPublishOnRegistry(imageName string, url urlpkg.URL, spooler *spoolerpkg.Client) error
- func WriteClout(clout *cloutpkg.Clout, writer io.Writer) error
- type Dynamic
- func (self *Dynamic) AddResourceEventHandler(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, ...) error
- func (self *Dynamic) AddUnstructuredResourceChangeHandler(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, ...) error
- func (self *Dynamic) AddUnstructuredResourceEventHandlerFuncs(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, onAdded OnAddedFunc, ...) error
- func (self *Dynamic) CreateControlledResource(object *unstructured.Unstructured, controllerObject meta.Object, ...) (*unstructured.Unstructured, error)
- func (self *Dynamic) CreateResource(object *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (self *Dynamic) GetInformers(gvk schema.GroupVersionKind) ([]cache.SharedInformer, []cache.SharedInformer, error)
- func (self *Dynamic) GetResource(gvk schema.GroupVersionKind, name string, namespace string) (*unstructured.Unstructured, error)
- func (self *Dynamic) UpdateResource(object *unstructured.Unstructured) (*unstructured.Unstructured, error)
- type GetControllerObjectFunc
- type OnAddedFunc
- type OnChangedFunc
- type OnDeletedFunc
- type OnUpdatedFunc
- type ProcessFunc
- type Processor
- type Processors
- func (self *Processors) Add(gvk schema.GroupVersionKind, processor *Processor)
- func (self *Processors) Control(dynamic *Dynamic, controlledGvk schema.GroupVersionKind, ...) error
- func (self *Processors) Get(name string) (*Processor, bool)
- func (self *Processors) HasSynced() []cache.InformerSynced
- func (self *Processors) ShutDown()
- func (self *Processors) Start(concurrency uint, stopChannel <-chan struct{})
- func (self *Processors) WaitForCacheSync(stopChannel <-chan struct{}) error
- type Table
- type TableStyle
- type TarEncoder
- type UnstructuredResourceEventHandler
Constants ¶
View Source
const ( TopSeparatorTableStyle = 1 << iota ColumnSeparatorTableStyle RowSeparatorTableStyle BottomSeparatorTableStyle )
Variables ¶
This section is empty.
Functions ¶
func CompileTOSCA ¶
func CreateEventRecorder ¶
func CreateEventRecorder(kubernetes kubernetes.Interface, component string, log *logging.Logger) record.EventRecorder
func DecodeYAMLTemplate ¶
func ExecScriptlet ¶
func FindResourceForKind ¶
func FindResourceForKind(discovery_ discoverypkg.DiscoveryInterface, gvk schema.GroupVersionKind, supportedVerbs ...string) (schema.GroupVersionResource, error)
func FindResourceForUnstructured ¶
func FindResourceForUnstructured(discovery discoverypkg.DiscoveryInterface, object *unstructured.Unstructured, supportedVerbs ...string) (schema.GroupVersionResource, error)
func FindResourcesForKind ¶
func FindResourcesForKind(discovery discoverypkg.DiscoveryInterface, gvk schema.GroupVersionKind, supportedVerbs ...string) ([]schema.GroupVersionResource, error)
func GetConfiguredNamespace ¶
func GetControllerOf ¶
func GetFileHash ¶
func GetFirstPodIP ¶
func GetFirstPodIP(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) (string, error)
func GetFirstPodName ¶
func GetFirstPodName(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) (string, error)
func GetFirstServiceIP ¶
func GetFirstServiceIP(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) (string, error)
func GetInternalRegistryURL ¶
func GetInternalRegistryURL(kubernetesClient kubernetes.Interface) (string, error)
func GetMetaObject ¶
func GetPodIPs ¶
func GetPodIPs(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) ([]string, error)
func GetPodNames ¶
func GetPodNames(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) ([]string, error)
func GetPods ¶
func GetPods(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) (*core.PodList, error)
func GetServiceAccountNamespace ¶
func GetServiceAccountNamespace() string
func GetServiceIPs ¶
func GetServiceIPs(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) ([]string, error)
func GetServices ¶
func GetServices(context contextpkg.Context, kubernetes kubernetespkg.Interface, namespace string, appName string) (*core.ServiceList, error)
func GetUnstructuredGVK ¶
func GetUnstructuredGVK(object *unstructured.Unstructured) (schema.GroupVersionKind, error)
func Log ¶
func Log(kubernetes kubernetespkg.Interface, namespace string, podName string, containerName string, tail int, follow bool) (io.ReadCloser, error)
func NewConfigForContext ¶
func NewConfigFromFlags ¶ added in v0.3.0
func NewConfigFromFlags(masterUrl string, configPath string, context string, log *logging.Logger) (*rest.Config, error)
See: clientcmd.BuildConfigFromFlags
func NewSelfContainedConfig ¶
func NewUnstructuredFromYAMLTemplate ¶
func NewUnstructuredFromYAMLTemplate(code string, data interface{}) (*unstructured.Unstructured, error)
func PublishOnRegistry ¶ added in v0.3.0
func PullLayerFromRegistry ¶
func SetControllerOfUnstructured ¶
func SetControllerOfUnstructured(object *unstructured.Unstructured, controllerObject meta.Object) error
controllerObject must also support schema.ObjectKind interface
func SetFlagsFromEnvironment ¶
func SetFlagsFromEnvironment(prefix string)
func SetupSignalHandler ¶
func SetupSignalHandler() <-chan struct{}
SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.
func SortedMapStringStringKeys ¶ added in v0.2.0
func TarAndPublishOnRegistry ¶ added in v0.3.0
TODO: unused. unnecessary?
Types ¶
type Dynamic ¶
type Dynamic struct { Dynamic dynamicpkg.Interface Discovery discovery.DiscoveryInterface InformerFactory dynamicinformer.DynamicSharedInformerFactory Log *logging.Logger // contains filtered or unexported fields }
func NewDynamic ¶
func NewDynamic(dynamic dynamicpkg.Interface, discovery discovery.DiscoveryInterface, namespace string, context context.Context) *Dynamic
func (*Dynamic) AddResourceEventHandler ¶
func (self *Dynamic) AddResourceEventHandler(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, handler cache.ResourceEventHandler) error
func (*Dynamic) AddUnstructuredResourceChangeHandler ¶
func (self *Dynamic) AddUnstructuredResourceChangeHandler(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, onChanged OnChangedFunc) error
func (*Dynamic) AddUnstructuredResourceEventHandlerFuncs ¶
func (self *Dynamic) AddUnstructuredResourceEventHandlerFuncs(gvk schema.GroupVersionKind, stopChannel <-chan struct{}, onAdded OnAddedFunc, onUpdated OnUpdatedFunc, onDeleted OnDeletedFunc) error
func (*Dynamic) CreateControlledResource ¶
func (self *Dynamic) CreateControlledResource(object *unstructured.Unstructured, controllerObject meta.Object, processors *Processors, stopChannel <-chan struct{}) (*unstructured.Unstructured, error)
controllerObject must also support schema.ObjectKind interface
func (*Dynamic) CreateResource ¶
func (self *Dynamic) CreateResource(object *unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*Dynamic) GetInformers ¶
func (self *Dynamic) GetInformers(gvk schema.GroupVersionKind) ([]cache.SharedInformer, []cache.SharedInformer, error)
func (*Dynamic) GetResource ¶
func (self *Dynamic) GetResource(gvk schema.GroupVersionKind, name string, namespace string) (*unstructured.Unstructured, error)
func (*Dynamic) UpdateResource ¶
func (self *Dynamic) UpdateResource(object *unstructured.Unstructured) (*unstructured.Unstructured, error)
type GetControllerObjectFunc ¶
type OnAddedFunc ¶
type OnAddedFunc = func(object *unstructured.Unstructured) error
type OnChangedFunc ¶
type OnChangedFunc = func(object *unstructured.Unstructured) error
type OnDeletedFunc ¶
type OnDeletedFunc = func(object *unstructured.Unstructured) error
type OnUpdatedFunc ¶
type OnUpdatedFunc = func(oldObject *unstructured.Unstructured, newObject *unstructured.Unstructured) error
type ProcessFunc ¶
type Processor ¶
type Processor struct { Name string GVK schema.GroupVersionKind Informer cache.SharedIndexInformer Workqueue workqueue.RateLimitingInterface Period time.Duration GetControllerObject GetControllerObjectFunc Process ProcessFunc Log *logging.Logger }
func NewProcessor ¶
func NewProcessor(name string, informer cache.SharedIndexInformer, period time.Duration, get GetControllerObjectFunc, process ProcessFunc) *Processor
func (*Processor) EnqueueFor ¶
func (self *Processor) EnqueueFor(object interface{})
type Processors ¶
type Processors struct {
// contains filtered or unexported fields
}
func NewProcessors ¶
func NewProcessors() *Processors
func (*Processors) Add ¶
func (self *Processors) Add(gvk schema.GroupVersionKind, processor *Processor)
func (*Processors) Control ¶
func (self *Processors) Control(dynamic *Dynamic, controlledGvk schema.GroupVersionKind, stopChannel <-chan struct{}) error
func (*Processors) HasSynced ¶
func (self *Processors) HasSynced() []cache.InformerSynced
func (*Processors) ShutDown ¶
func (self *Processors) ShutDown()
func (*Processors) Start ¶
func (self *Processors) Start(concurrency uint, stopChannel <-chan struct{})
func (*Processors) WaitForCacheSync ¶
func (self *Processors) WaitForCacheSync(stopChannel <-chan struct{}) error
type Table ¶
type Table struct { Rows [][][]string Style TableStyle MaxWidth int HeadingSeparator string RowSeparator string TopDividerSeparator string TopDivider string MiddleDividerSeparator string MiddleDivider string BottomDividerSeparator string BottomDivider string }
func (*Table) ColumnWidths ¶
type TableStyle ¶
type TableStyle uint8
type TarEncoder ¶
type TarEncoder struct {
// contains filtered or unexported fields
}
func NewTarEncoder ¶
func NewTarEncoder(reader io.Reader, size int64) *TarEncoder
func (*TarEncoder) Drain ¶
func (self *TarEncoder) Drain()
func (*TarEncoder) Encode ¶
func (self *TarEncoder) Encode() io.Reader
type UnstructuredResourceEventHandler ¶
type UnstructuredResourceEventHandler struct {
// contains filtered or unexported fields
}
func NewUnstructuredResourceEventHandler ¶
func NewUnstructuredResourceEventHandler(onAdded OnAddedFunc, onUpdated OnUpdatedFunc, onDeleted OnDeletedFunc) *UnstructuredResourceEventHandler
func (*UnstructuredResourceEventHandler) OnAdd ¶
func (self *UnstructuredResourceEventHandler) OnAdd(object interface{})
cache.ResourceEventHandler interface
func (*UnstructuredResourceEventHandler) OnDelete ¶
func (self *UnstructuredResourceEventHandler) OnDelete(object interface{})
cache.ResourceEventHandler interface
func (*UnstructuredResourceEventHandler) OnUpdate ¶
func (self *UnstructuredResourceEventHandler) OnUpdate(oldObject interface{}, newObject interface{})
cache.ResourceEventHandler interface
Click to show internal directories.
Click to hide internal directories.