Documentation
¶
Index ¶
- Constants
- Variables
- func GenMyPtyHandlerId() string
- func HandleExecShell(input *websocket_pb.WsHandleExecShellInput, conn *WsConn) (string, error)
- func HandleWsAuthorize(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsCancel(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsCreateProject(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsHandleCloseShell(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsHandleExecShell(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsHandleExecShellMsg(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsProjectPodEvent(c *WsConn, t websocket_pb.Type, message []byte)
- func HandleWsUpdateProject(c *WsConn, t websocket_pb.Type, message []byte)
- func InstallProject(job contracts.Job) (err error)
- func NewJober(input *JobInput, user contracts.UserInfo, slugName string, ...) contracts.Job
- func NewMessageSender(conn *WsConn, slugName string, wsType websocket_pb.Type) contracts.DeployMsger
- func NewRecorder(action types.EventActionType, user contracts.UserInfo, timer timer.Timer, ...) contracts.RecorderInterface
- func NewSessionMap(conn *WsConn) contracts.SessionMapper
- func WaitForTerminal(conn *WsConn, k8sClient kubernetes.Interface, cfg *rest.Config, ...)
- type ChartFileLoader
- type DefaultHelmer
- func (d *DefaultHelmer) PackageChart(path string, destDir string) (string, error)
- func (d *DefaultHelmer) ReleaseStatus(releaseName, namespace string) types.Deploy
- func (d *DefaultHelmer) Rollback(releaseName, namespace string, wait bool, log contracts.LogFn, dryRun bool) error
- func (d *DefaultHelmer) Uninstall(releaseName, namespace string, log contracts.LogFn) error
- func (d *DefaultHelmer) UpgradeOrInstall(ctx context.Context, releaseName, namespace string, ch *chart.Chart, ...) (*release.Release, error)
- type DeployResult
- type DynamicLoader
- type ExtraValuesLoader
- type HandleRequestFunc
- type JobInput
- type Loader
- type MergeValuesLoader
- type NewJobFunc
- type Option
- type ReleaseInstallerLoader
- type Sleeper
- type TerminalResponse
- type VariableLoader
- type WaitSocketExitInterface
- type WebsocketManager
- type WsConn
- type WsResponse
Constants ¶
View Source
const ( ResultError = websocket_pb.ResultType_Error ResultSuccess = websocket_pb.ResultType_Success ResultDeployed = websocket_pb.ResultType_Deployed ResultDeployFailed = websocket_pb.ResultType_DeployedFailed ResultDeployCanceled = websocket_pb.ResultType_DeployedCanceled ResultLogWithContainers = websocket_pb.ResultType_LogWithContainers WsSetUid = websocket_pb.Type_SetUid WsReloadProjects = websocket_pb.Type_ReloadProjects WsCancel = websocket_pb.Type_CancelProject WsCreateProject = websocket_pb.Type_CreateProject WsUpdateProject = websocket_pb.Type_UpdateProject WsProcessPercent = websocket_pb.Type_ProcessPercent WsClusterInfoSync = websocket_pb.Type_ClusterInfoSync WsInternalError = websocket_pb.Type_InternalError WsHandleExecShell = websocket_pb.Type_HandleExecShell WsHandleExecShellMsg = websocket_pb.Type_HandleExecShellMsg WsHandleCloseShell = websocket_pb.Type_HandleCloseShell WsAuthorize = websocket_pb.Type_HandleAuthorize ProjectPodEvent = websocket_pb.Type_ProjectPodEvent )
View Source
const ( VarImagePullSecrets = "ImagePullSecrets" VarBranch = "Branch" VarCommit = "Commit" VarPipeline = "Pipeline" VarClusterIssuer = "ClusterIssuer" VarHost = "Host" VarTlsSecret = "TlsSecret" )
View Source
const ( OpStdout = "stdout" OpStdin = "stdin" OpResize = "resize" OpToast = "toast" )
Variables ¶
View Source
var ( ETX = []byte("\u0003") END_OF_TRANSMISSION = []byte("\u0004") )
View Source
var AuditLogWithChange = events.AuditLog
View Source
var (
ErrorVersionNotMatched = errors.New("当前版本和最新版本存在差异,请刷新重试")
)
Functions ¶
func GenMyPtyHandlerId ¶
func GenMyPtyHandlerId() string
func HandleExecShell ¶
func HandleExecShell(input *websocket_pb.WsHandleExecShellInput, conn *WsConn) (string, error)
func HandleWsAuthorize ¶
func HandleWsAuthorize(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsCancel ¶
func HandleWsCancel(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsCreateProject ¶
func HandleWsCreateProject(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsHandleCloseShell ¶
func HandleWsHandleCloseShell(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsHandleExecShell ¶
func HandleWsHandleExecShell(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsHandleExecShellMsg ¶
func HandleWsHandleExecShellMsg(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsProjectPodEvent ¶
func HandleWsProjectPodEvent(c *WsConn, t websocket_pb.Type, message []byte)
func HandleWsUpdateProject ¶
func HandleWsUpdateProject(c *WsConn, t websocket_pb.Type, message []byte)
func InstallProject ¶
func NewMessageSender ¶
func NewMessageSender(conn *WsConn, slugName string, wsType websocket_pb.Type) contracts.DeployMsger
func NewRecorder ¶
func NewRecorder(action types.EventActionType, user contracts.UserInfo, timer timer.Timer, container contracts.Container) contracts.RecorderInterface
func NewSessionMap ¶
func NewSessionMap(conn *WsConn) contracts.SessionMapper
func WaitForTerminal ¶
func WaitForTerminal(conn *WsConn, k8sClient kubernetes.Interface, cfg *rest.Config, container *contracts.Container, shell, sessionId string)
WaitForTerminal is called from apihandler.handleAttach as a goroutine Waits for the SockJS connection to be opened by the client the session to be bound in handleMyPtyHandler
Types ¶
type ChartFileLoader ¶
type ChartFileLoader struct {
// contains filtered or unexported fields
}
func (*ChartFileLoader) Load ¶
func (c *ChartFileLoader) Load(j *jobRunner) error
type DefaultHelmer ¶
type DefaultHelmer struct{}
func (*DefaultHelmer) PackageChart ¶
func (d *DefaultHelmer) PackageChart(path string, destDir string) (string, error)
func (*DefaultHelmer) ReleaseStatus ¶
func (d *DefaultHelmer) ReleaseStatus(releaseName, namespace string) types.Deploy
type DeployResult ¶
func (*DeployResult) IsSet ¶
func (d *DeployResult) IsSet() bool
func (*DeployResult) Model ¶
func (d *DeployResult) Model() *types.ProjectModel
func (*DeployResult) Msg ¶
func (d *DeployResult) Msg() string
func (*DeployResult) ResultType ¶
func (d *DeployResult) ResultType() websocket_pb.ResultType
func (*DeployResult) Set ¶
func (d *DeployResult) Set(t websocket_pb.ResultType, msg string, model *types.ProjectModel)
type DynamicLoader ¶
type DynamicLoader struct{}
func (*DynamicLoader) Load ¶
func (d *DynamicLoader) Load(j *jobRunner) error
type ExtraValuesLoader ¶
type ExtraValuesLoader struct{}
func (*ExtraValuesLoader) Load ¶
func (d *ExtraValuesLoader) Load(j *jobRunner) error
type HandleRequestFunc ¶
type HandleRequestFunc func(c *WsConn, t websocket_pb.Type, message []byte)
type MergeValuesLoader ¶
type MergeValuesLoader struct{}
func (*MergeValuesLoader) Load ¶
func (m *MergeValuesLoader) Load(j *jobRunner) error
Load imagePullSecrets 会自动注入到 imagePullSecrets 中
type NewJobFunc ¶
type ReleaseInstallerLoader ¶
type ReleaseInstallerLoader struct{}
func (*ReleaseInstallerLoader) Load ¶
func (r *ReleaseInstallerLoader) Load(j *jobRunner) error
type TerminalResponse ¶
type TerminalResponse struct {
ID string `json:"id"`
}
type VariableLoader ¶
type VariableLoader struct {
// contains filtered or unexported fields
}
func (*VariableLoader) Load ¶
func (v *VariableLoader) Load(j *jobRunner) error
type WaitSocketExitInterface ¶
type WaitSocketExitInterface interface { Inc() Dec() Wait() Count() int }
var Wait WaitSocketExitInterface = NewWaitSocketExit()
func NewWaitSocketExit ¶
func NewWaitSocketExit() WaitSocketExitInterface
type WebsocketManager ¶
type WebsocketManager struct {
// contains filtered or unexported fields
}
func NewWebsocketManager ¶
func NewWebsocketManager(healthTickDuration time.Duration) *WebsocketManager
func (*WebsocketManager) Info ¶
func (wc *WebsocketManager) Info(writer http.ResponseWriter, request *http.Request)
func (*WebsocketManager) TickClusterHealth ¶
func (wc *WebsocketManager) TickClusterHealth()
func (*WebsocketManager) Ws ¶
func (wc *WebsocketManager) Ws(w http.ResponseWriter, r *http.Request)
type WsResponse ¶
type WsResponse = websocket_pb.WsMetadataResponse
Click to show internal directories.
Click to hide internal directories.