androidSdk

package
v0.0.0-...-37b146d Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstallerPodName = "android-sdk-pkg-install"
	UpdaterPodName   = "android-sdk-pkg-update"
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(kube HandlerKube, helper HandlerSdk) sdk.Handler

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, event sdk.Event) error

type HandlerKube

type HandlerKube interface {
	GetPod(name string, ns string) (*corev1.Pod, error)
	GetConfigMap(name string, ns string) (*corev1.ConfigMap, error)
}

type HandlerSdk

type HandlerSdk interface {
	IsInstallerPod(name string) bool
	EncodeData(configMap *corev1.ConfigMap) (string, error)
	GetConfigData(configMap *corev1.ConfigMap) (string, error)
	GetSdkPod(cmd []string, podName string, configMapName string, ns string) *corev1.Pod
}

type Kube

type Kube struct {
	// contains filtered or unexported fields
}

func NewKube

func NewKube(k8c kubernetes.Interface) Kube

func (*Kube) GetConfigMap

func (kube *Kube) GetConfigMap(name string, ns string) (*v1.ConfigMap, error)

func (*Kube) GetPod

func (kube *Kube) GetPod(name string, ns string) (*v1.Pod, error)

type SdkHelper

type SdkHelper struct {
	Image string
}

func DefaultSdkHelper

func DefaultSdkHelper() SdkHelper

func NewSdkhelper

func NewSdkhelper(image string) SdkHelper

func (*SdkHelper) EncodeData

func (helper *SdkHelper) EncodeData(configMap *corev1.ConfigMap) (string, error)

func (*SdkHelper) GetConfigData

func (helper *SdkHelper) GetConfigData(configMap *corev1.ConfigMap) (string, error)

func (*SdkHelper) GetSdkPod

func (helper *SdkHelper) GetSdkPod(cmd []string, podName string, configMapName string, ns string) *corev1.Pod

func (*SdkHelper) IsInstallerPod

func (helper *SdkHelper) IsInstallerPod(name string) bool

Jump to

Keyboard shortcuts

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