Help us shape the future of Go! Take the 2026 Go Developer Survey

k8s

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CLUSTER = "default_cluster"

Variables

Functions

This section is empty.

Types

type K8sApplicationRestHandler

type K8sApplicationRestHandler interface {
	GetResource(w http.ResponseWriter, r *http.Request)
	CreateResource(w http.ResponseWriter, r *http.Request)
	UpdateResource(w http.ResponseWriter, r *http.Request)
	DeleteResource(w http.ResponseWriter, r *http.Request)
	ListEvents(w http.ResponseWriter, r *http.Request)
	GetPodLogs(w http.ResponseWriter, r *http.Request)
	GetTerminalSession(w http.ResponseWriter, r *http.Request)
}

type K8sApplicationRestHandlerImpl

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

func NewK8sApplicationRestHandlerImpl

func NewK8sApplicationRestHandlerImpl(logger *zap.SugaredLogger,
	k8sApplicationService K8sApplicationService, pump connector.Pump,
	terminalSessionHandler terminal.TerminalSessionHandler,
	enforcer casbin.Enforcer, enforcerUtil rbac.EnforcerUtilHelm, clusterService cluster.ClusterService,
	helmAppService client.HelmAppService) *K8sApplicationRestHandlerImpl

func (*K8sApplicationRestHandlerImpl) CreateResource

func (handler *K8sApplicationRestHandlerImpl) CreateResource(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) DeleteResource

func (handler *K8sApplicationRestHandlerImpl) DeleteResource(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) GetPodLogs

func (handler *K8sApplicationRestHandlerImpl) GetPodLogs(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) GetResource

func (handler *K8sApplicationRestHandlerImpl) GetResource(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) GetTerminalSession

func (handler *K8sApplicationRestHandlerImpl) GetTerminalSession(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) ListEvents

func (handler *K8sApplicationRestHandlerImpl) ListEvents(w http.ResponseWriter, r *http.Request)

func (*K8sApplicationRestHandlerImpl) UpdateResource

func (handler *K8sApplicationRestHandlerImpl) UpdateResource(w http.ResponseWriter, r *http.Request)

type K8sApplicationRouter

type K8sApplicationRouter interface {
	InitK8sApplicationRouter(helmRouter *mux.Router)
}

type K8sApplicationRouterImpl

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

func NewK8sApplicationRouterImpl

func NewK8sApplicationRouterImpl(k8sApplicationRestHandler K8sApplicationRestHandler) *K8sApplicationRouterImpl

func (*K8sApplicationRouterImpl) InitK8sApplicationRouter

func (impl *K8sApplicationRouterImpl) InitK8sApplicationRouter(k8sAppRouter *mux.Router)

type K8sApplicationService

type K8sApplicationService interface {
	GetResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error)
	CreateResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error)
	UpdateResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error)
	DeleteResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error)
	ListEvents(request *ResourceRequestBean) (*application.EventsResponse, error)
	GetPodLogs(request *ResourceRequestBean) (io.ReadCloser, error)
	ValidateResourceRequest(appIdentifier *client.AppIdentifier, request *application.K8sRequestBean) (bool, error)
}

type K8sApplicationServiceImpl

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

func NewK8sApplicationServiceImpl

func NewK8sApplicationServiceImpl(Logger *zap.SugaredLogger,
	clusterService cluster.ClusterService,
	pump connector.Pump, k8sClientService application.K8sClientService,
	helmAppService client.HelmAppService) *K8sApplicationServiceImpl

func (*K8sApplicationServiceImpl) CreateResource

func (*K8sApplicationServiceImpl) DeleteResource

func (*K8sApplicationServiceImpl) GetPodLogs

func (impl *K8sApplicationServiceImpl) GetPodLogs(request *ResourceRequestBean) (io.ReadCloser, error)

func (*K8sApplicationServiceImpl) GetResource

func (*K8sApplicationServiceImpl) ListEvents

func (*K8sApplicationServiceImpl) UpdateResource

func (*K8sApplicationServiceImpl) ValidateResourceRequest

func (impl *K8sApplicationServiceImpl) ValidateResourceRequest(appIdentifier *client.AppIdentifier, request *application.K8sRequestBean) (bool, error)

type ResourceRequestBean

type ResourceRequestBean struct {
	AppId         string                      `json:"appId"`
	AppIdentifier *client.AppIdentifier       `json:"-"`
	K8sRequest    *application.K8sRequestBean `json:"k8sRequest"`
}

Jump to

Keyboard shortcuts

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