Documentation ¶
Overview ¶
Package socket is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetSlugName[T int64 | int | int32](namespaceId T, name string) string
- func InstallProject(ctx context.Context, job Job) (err error)
- func IsRemoteLocalChartPath(input string) bool
- func NewCloser(fn func() error) io.Closer
- func NewEmptyCommit() application.Commit
- func NewEmptyPubSub() application.PubSub
- func NewWebsocketManager(logger mlog.Logger, counter counter.Counter, projRepo repo.ProjectRepo, ...) application.WsHttpServer
- type ChartFileLoader
- type Conn
- type DeployMsger
- type ElementsLoader
- type GorillaWs
- type HandleRequestFunc
- type InstallInput
- type Job
- type JobInput
- type JobManager
- type Loader
- type MergeValuesLoader
- type MessageItem
- type MessageType
- type MockConn
- func (m *MockConn) AddCancelDeployTask(arg0 string, arg1 func(error)) error
- func (m *MockConn) Close() error
- func (m *MockConn) CloseAndClean(arg0 context.Context) error
- func (m *MockConn) ClosePty(arg0 context.Context, arg1 string, arg2 uint32, arg3 string)
- func (m *MockConn) EXPECT() *MockConnMockRecorder
- func (m *MockConn) GetPtyHandler(arg0 string) (PtyHandler, bool)
- func (m *MockConn) GetUser() *schematype.UserInfo
- func (m *MockConn) ID() string
- func (m *MockConn) NextWriter(arg0 int) (io.WriteCloser, error)
- func (m *MockConn) PubSub() application.PubSub
- func (m *MockConn) ReadMessage() (int, []byte, error)
- func (m *MockConn) RemoveCancelDeployTask(arg0 string)
- func (m *MockConn) RunCancelDeployTask(arg0 string) error
- func (m *MockConn) SetPongHandler(arg0 func(string) error)
- func (m *MockConn) SetPtyHandler(arg0 string, arg1 PtyHandler)
- func (m *MockConn) SetReadDeadline(arg0 time.Time) error
- func (m *MockConn) SetReadLimit(arg0 int64)
- func (m *MockConn) SetUser(arg0 *schematype.UserInfo)
- func (m *MockConn) SetWriteDeadline(arg0 time.Time) error
- func (m *MockConn) UID() string
- func (m *MockConn) WriteMessage(arg0 int, arg1 []byte) error
- type MockConnMockRecorder
- func (mr *MockConnMockRecorder) AddCancelDeployTask(arg0, arg1 any) *gomock.Call
- func (mr *MockConnMockRecorder) Close() *gomock.Call
- func (mr *MockConnMockRecorder) CloseAndClean(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) ClosePty(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockConnMockRecorder) GetPtyHandler(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) GetUser() *gomock.Call
- func (mr *MockConnMockRecorder) ID() *gomock.Call
- func (mr *MockConnMockRecorder) NextWriter(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) PubSub() *gomock.Call
- func (mr *MockConnMockRecorder) ReadMessage() *gomock.Call
- func (mr *MockConnMockRecorder) RemoveCancelDeployTask(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) RunCancelDeployTask(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetPongHandler(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetPtyHandler(arg0, arg1 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetReadLimit(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetUser(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) UID() *gomock.Call
- func (mr *MockConnMockRecorder) WriteMessage(arg0, arg1 any) *gomock.Call
- type MockDeployMsger
- func (m *MockDeployMsger) Add()
- func (m *MockDeployMsger) Current() int64
- func (m *MockDeployMsger) EXPECT() *MockDeployMsgerMockRecorder
- func (m *MockDeployMsger) SendDeployedResult(arg0 websocket.ResultType, arg1 string, arg2 *types.ProjectModel)
- func (m *MockDeployMsger) SendEndError(arg0 error)
- func (m *MockDeployMsger) SendMsg(arg0 string)
- func (m *MockDeployMsger) SendMsgWithContainerLog(arg0 string, arg1 []*websocket.Container)
- func (m *MockDeployMsger) SendProcessPercent(arg0 int64)
- func (m *MockDeployMsger) SendProtoMsg(arg0 application.WebsocketMessage)
- func (m *MockDeployMsger) To(arg0 int64)
- type MockDeployMsgerMockRecorder
- func (mr *MockDeployMsgerMockRecorder) Add() *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) Current() *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendDeployedResult(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendEndError(arg0 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendMsg(arg0 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendMsgWithContainerLog(arg0, arg1 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendProcessPercent(arg0 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) SendProtoMsg(arg0 any) *gomock.Call
- func (mr *MockDeployMsgerMockRecorder) To(arg0 any) *gomock.Call
- type MockGorillaWs
- func (m *MockGorillaWs) Close() error
- func (m *MockGorillaWs) EXPECT() *MockGorillaWsMockRecorder
- func (m *MockGorillaWs) NextWriter(arg0 int) (io.WriteCloser, error)
- func (m *MockGorillaWs) ReadMessage() (int, []byte, error)
- func (m *MockGorillaWs) SetPongHandler(arg0 func(string) error)
- func (m *MockGorillaWs) SetReadDeadline(arg0 time.Time) error
- func (m *MockGorillaWs) SetReadLimit(arg0 int64)
- func (m *MockGorillaWs) SetWriteDeadline(arg0 time.Time) error
- func (m *MockGorillaWs) WriteMessage(arg0 int, arg1 []byte) error
- type MockGorillaWsMockRecorder
- func (mr *MockGorillaWsMockRecorder) Close() *gomock.Call
- func (mr *MockGorillaWsMockRecorder) NextWriter(arg0 any) *gomock.Call
- func (mr *MockGorillaWsMockRecorder) ReadMessage() *gomock.Call
- func (mr *MockGorillaWsMockRecorder) SetPongHandler(arg0 any) *gomock.Call
- func (mr *MockGorillaWsMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
- func (mr *MockGorillaWsMockRecorder) SetReadLimit(arg0 any) *gomock.Call
- func (mr *MockGorillaWsMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
- func (mr *MockGorillaWsMockRecorder) WriteMessage(arg0, arg1 any) *gomock.Call
- type MockJob
- func (m *MockJob) EXPECT() *MockJobMockRecorder
- func (m *MockJob) Error() error
- func (m *MockJob) Finish() Job
- func (m *MockJob) GlobalLock() Job
- func (m *MockJob) ID() string
- func (m *MockJob) IsNotDryRun() bool
- func (m *MockJob) LoadConfigs() Job
- func (m *MockJob) Manifests() []string
- func (m *MockJob) OnError(arg0 int, arg1 func(error, func())) Job
- func (m *MockJob) OnFinally(arg0 int, arg1 func(error, func())) Job
- func (m *MockJob) OnSuccess(arg0 int, arg1 func(error, func())) Job
- func (m *MockJob) Project() *repo.Project
- func (m *MockJob) Run(arg0 context.Context) Job
- func (m *MockJob) Stop(arg0 error)
- func (m *MockJob) Validate() Job
- type MockJobManager
- type MockJobManagerMockRecorder
- type MockJobMockRecorder
- func (mr *MockJobMockRecorder) Error() *gomock.Call
- func (mr *MockJobMockRecorder) Finish() *gomock.Call
- func (mr *MockJobMockRecorder) GlobalLock() *gomock.Call
- func (mr *MockJobMockRecorder) ID() *gomock.Call
- func (mr *MockJobMockRecorder) IsNotDryRun() *gomock.Call
- func (mr *MockJobMockRecorder) LoadConfigs() *gomock.Call
- func (mr *MockJobMockRecorder) Manifests() *gomock.Call
- func (mr *MockJobMockRecorder) OnError(arg0, arg1 any) *gomock.Call
- func (mr *MockJobMockRecorder) OnFinally(arg0, arg1 any) *gomock.Call
- func (mr *MockJobMockRecorder) OnSuccess(arg0, arg1 any) *gomock.Call
- func (mr *MockJobMockRecorder) Project() *gomock.Call
- func (mr *MockJobMockRecorder) Run(arg0 any) *gomock.Call
- func (mr *MockJobMockRecorder) Stop(arg0 any) *gomock.Call
- func (mr *MockJobMockRecorder) Validate() *gomock.Call
- type MockPercentable
- type MockPercentableMockRecorder
- type MockPtyHandler
- func (m *MockPtyHandler) Close(arg0 context.Context, arg1 string) bool
- func (m *MockPtyHandler) Cols() uint16
- func (m *MockPtyHandler) Container() *repo.Container
- func (m *MockPtyHandler) EXPECT() *MockPtyHandlerMockRecorder
- func (m *MockPtyHandler) IsClosed() bool
- func (m *MockPtyHandler) Next() *remotecommand.TerminalSize
- func (m *MockPtyHandler) Read(arg0 []byte) (int, error)
- func (m *MockPtyHandler) Recorder() repo.Recorder
- func (m *MockPtyHandler) ResetTerminalRowCol(arg0 bool)
- func (m *MockPtyHandler) Resize(arg0 remotecommand.TerminalSize) error
- func (m *MockPtyHandler) Rows() uint16
- func (m *MockPtyHandler) Send(arg0 context.Context, arg1 *websocket.TerminalMessage) error
- func (m *MockPtyHandler) SetShell(arg0 string)
- func (m *MockPtyHandler) Toast(arg0 string) error
- func (m *MockPtyHandler) Write(arg0 []byte) (int, error)
- type MockPtyHandlerMockRecorder
- func (mr *MockPtyHandlerMockRecorder) Close(arg0, arg1 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Cols() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Container() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) IsClosed() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Next() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Read(arg0 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Recorder() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) ResetTerminalRowCol(arg0 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Resize(arg0 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Rows() *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Send(arg0, arg1 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) SetShell(arg0 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Toast(arg0 any) *gomock.Call
- func (mr *MockPtyHandlerMockRecorder) Write(arg0 any) *gomock.Call
- type MockReleaseInstaller
- type MockReleaseInstallerMockRecorder
- type MockSafeWriteMessageChan
- type MockSafeWriteMessageChanMockRecorder
- type MockSessionMapper
- func (m *MockSessionMapper) Close(arg0 context.Context, arg1 string, arg2 uint32, arg3 string)
- func (m *MockSessionMapper) CloseAll(arg0 context.Context)
- func (m *MockSessionMapper) EXPECT() *MockSessionMapperMockRecorder
- func (m *MockSessionMapper) Get(arg0 string) (PtyHandler, bool)
- func (m *MockSessionMapper) Set(arg0 string, arg1 PtyHandler)
- type MockSessionMapperMockRecorder
- func (mr *MockSessionMapperMockRecorder) Close(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockSessionMapperMockRecorder) CloseAll(arg0 any) *gomock.Call
- func (mr *MockSessionMapperMockRecorder) Get(arg0 any) *gomock.Call
- func (mr *MockSessionMapperMockRecorder) Set(arg0, arg1 any) *gomock.Call
- type MockTaskManager
- func (m *MockTaskManager) EXPECT() *MockTaskManagerMockRecorder
- func (m *MockTaskManager) Has(arg0 string) bool
- func (m *MockTaskManager) Register(arg0 string, arg1 func(error)) error
- func (m *MockTaskManager) Remove(arg0 string)
- func (m *MockTaskManager) Stop(arg0 string)
- func (m *MockTaskManager) StopAll()
- type MockTaskManagerMockRecorder
- func (mr *MockTaskManagerMockRecorder) Has(arg0 any) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) Register(arg0, arg1 any) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) Remove(arg0 any) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) Stop(arg0 any) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) StopAll() *gomock.Call
- type Percentable
- type PtyHandler
- type ReleaseInstaller
- type SafeWriteMessageChan
- type SessionMapper
- type Sleeper
- type SystemVariableLoader
- type TaskManager
- type TerminalResponse
- type UserConfigLoader
- type WebsocketManager
- func (wc *WebsocketManager) HandleAuthorize(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleCloseShell(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleJoinRoom(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleShellMessage(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleStartShell(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleWsCancelDeploy(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleWsCreateProject(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) HandleWsUpdateProject(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
- func (wc *WebsocketManager) Info(writer http.ResponseWriter, request *http.Request)
- func (wc *WebsocketManager) Serve(w http.ResponseWriter, r *http.Request)
- func (wc *WebsocketManager) Shutdown(ctx context.Context) error
- func (wc *WebsocketManager) StartShell(ctx context.Context, input *websocket_pb.WsHandleExecShellInput, conn Conn) (string, error)
- func (wc *WebsocketManager) TickClusterHealth(done <-chan struct{})
- func (wc *WebsocketManager) WaitForTerminal(ctx context.Context, conn Conn, container *repo.Container, ...)
- type WsConn
- func (c *WsConn) AddCancelDeployTask(id string, fn func(error)) error
- func (c *WsConn) CloseAndClean(ctx context.Context) error
- func (c *WsConn) ClosePty(ctx context.Context, sessionId string, status uint32, reason string)
- func (c *WsConn) GetPtyHandler(sessionID string) (PtyHandler, bool)
- func (c *WsConn) GetUser() *auth.UserInfo
- func (c *WsConn) ID() string
- func (c *WsConn) PubSub() application.PubSub
- func (c *WsConn) RemoveCancelDeployTask(id string)
- func (c *WsConn) RunCancelDeployTask(id string) error
- func (c *WsConn) SetPtyHandler(sessionID string, session PtyHandler)
- func (c *WsConn) SetUser(info *auth.UserInfo)
- func (c *WsConn) UID() string
- type WsResponse
Constants ¶
const ( VarImagePullSecrets = "ImagePullSecrets" VarImagePullSecretsNoName = "ImagePullSecretsNoName" VarBranch = "Branch" VarCommit = "Commit" VarPipeline = "Pipeline" VarClusterIssuer = "ClusterIssuer" VarHost = "Host" VarTlsSecret = "TlsSecret" )
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 )
const ( OpStdout = "stdout" OpStdin = "stdin" OpResize = "resize" OpToast = "toast" )
Variables ¶
var ( ETX = []byte("\u0003") END_OF_TRANSMISSION = []byte("\u0004") )
var ErrorVersionNotMatched = errors.New("[部署冲突]: 1. 可能是多个人同时部署导致 2. 项目已经存在")
var WireSocket = wire.NewSet(NewWebsocketManager, NewJobManager, counter.NewCounter, NewReleaseInstaller)
Functions ¶
func IsRemoteLocalChartPath ¶
func NewEmptyCommit ¶
func NewEmptyCommit() application.Commit
func NewEmptyPubSub ¶
func NewEmptyPubSub() application.PubSub
func NewWebsocketManager ¶
func NewWebsocketManager( logger mlog.Logger, counter counter.Counter, projRepo repo.ProjectRepo, repoRepo repo.RepoRepo, nsRepo repo.NamespaceRepo, jobManager JobManager, data data.Data, pl application.PluginManger, auth auth.Auth, uploader uploader.Uploader, locker locker.Locker, clusterRepo repo.K8sRepo, eventRepo repo.EventRepo, executor repo.ExecutorManager, fileRepo repo.FileRepo, ) application.WsHttpServer
Types ¶
type ChartFileLoader ¶
type ChartFileLoader struct {
// contains filtered or unexported fields
}
ChartFileLoader 下载远程 chart 文件
func (*ChartFileLoader) Load ¶
func (c *ChartFileLoader) Load(j *jobRunner) error
type Conn ¶
type Conn interface { ID() string UID() string SetUser(info *auth.UserInfo) GetUser() *auth.UserInfo PubSub() application.PubSub AddCancelDeployTask(id string, fn func(error)) error RunCancelDeployTask(id string) error RemoveCancelDeployTask(id string) GetPtyHandler(sessionID string) (PtyHandler, bool) SetPtyHandler(sessionID string, session PtyHandler) ClosePty(ctx context.Context, sessionId string, status uint32, reason string) CloseAndClean(ctx context.Context) error GorillaWs }
type DeployMsger ¶
type DeployMsger interface { Percentable SendProcessPercent(int64) SendDeployedResult(t websocket_pb.ResultType, msg string, p *types.ProjectModel) SendEndError(error) SendMsg(string) SendProtoMsg(application.WebsocketMessage) SendMsgWithContainerLog(msg string, containers []*websocket_pb.Container) }
func NewMessageSender ¶
func NewMessageSender( conn Conn, slugName string, wsType websocket_pb.Type, ) DeployMsger
type ElementsLoader ¶
type ElementsLoader struct{}
ElementsLoader 后台自定义配置加载, 返回一个片段
```yaml resources:
limits: cpu: 100m
ingress:
enables: true
```
func (*ElementsLoader) Load ¶
func (d *ElementsLoader) Load(j *jobRunner) error
type GorillaWs ¶
type GorillaWs interface { SetWriteDeadline(t time.Time) error WriteMessage(messageType int, data []byte) error SetReadLimit(limit int64) SetReadDeadline(t time.Time) error SetPongHandler(h func(appData string) error) ReadMessage() (messageType int, p []byte, err error) NextWriter(messageType int) (io.WriteCloser, error) Close() error }
type HandleRequestFunc ¶
type InstallInput ¶
type Job ¶
type Job interface { Stop(error) IsNotDryRun() bool ID() string GlobalLock() Job Validate() Job LoadConfigs() Job Run(ctx context.Context) Job Finish() Job Error() error Project() *repo.Project Manifests() []string OnError(p int, fn func(err error, sendResultToUser func())) Job OnSuccess(p int, fn func(err error, sendResultToUser func())) Job OnFinally(p int, fn func(err error, sendResultToUser func())) Job }
type JobInput ¶
type JobInput struct { Type websocket_pb.Type NamespaceId int32 Name string RepoID int32 GitBranch string GitCommit string Config string Atomic *bool ExtraValues []*websocket_pb.ExtraValue Version *int32 ProjectID int32 TimeoutSeconds int32 User *auth.UserInfo DryRun bool PubSub application.PubSub `json:"-"` Messager DeployMsger `json:"-"` }
func (*JobInput) IsNotDryRun ¶
type JobManager ¶
func NewJobManager ¶
func NewJobManager( data data.Data, timer timer.Timer, logger mlog.Logger, releaseInstaller ReleaseInstaller, repoRepo repo.RepoRepo, nsRepo repo.NamespaceRepo, projRepo repo.ProjectRepo, helmer repo.HelmerRepo, uploader uploader.Uploader, locker locker.Locker, k8sRepo repo.K8sRepo, eventRepo repo.EventRepo, pl application.PluginManger, ) JobManager
type MergeValuesLoader ¶
type MergeValuesLoader struct{}
func (*MergeValuesLoader) Load ¶
func (m *MergeValuesLoader) Load(j *jobRunner) error
Load imagePullSecrets 会自动注入到 imagePullSecrets 中
type MessageItem ¶
type MessageItem struct { Msg string Type MessageType Containers []*websocket_pb.Container }
type MessageType ¶
type MessageType uint8
const ( MessageSuccess MessageType MessageError MessageText )
type MockConn ¶
type MockConn struct {
// contains filtered or unexported fields
}
MockConn is a mock of Conn interface.
func NewMockConn ¶
func NewMockConn(ctrl *gomock.Controller) *MockConn
NewMockConn creates a new mock instance.
func (*MockConn) AddCancelDeployTask ¶
AddCancelDeployTask mocks base method.
func (*MockConn) CloseAndClean ¶
CloseAndClean mocks base method.
func (*MockConn) EXPECT ¶
func (m *MockConn) EXPECT() *MockConnMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConn) GetPtyHandler ¶
func (m *MockConn) GetPtyHandler(arg0 string) (PtyHandler, bool)
GetPtyHandler mocks base method.
func (*MockConn) GetUser ¶
func (m *MockConn) GetUser() *schematype.UserInfo
GetUser mocks base method.
func (*MockConn) NextWriter ¶
func (m *MockConn) NextWriter(arg0 int) (io.WriteCloser, error)
NextWriter mocks base method.
func (*MockConn) ReadMessage ¶
ReadMessage mocks base method.
func (*MockConn) RemoveCancelDeployTask ¶
RemoveCancelDeployTask mocks base method.
func (*MockConn) RunCancelDeployTask ¶
RunCancelDeployTask mocks base method.
func (*MockConn) SetPongHandler ¶
SetPongHandler mocks base method.
func (*MockConn) SetPtyHandler ¶
func (m *MockConn) SetPtyHandler(arg0 string, arg1 PtyHandler)
SetPtyHandler mocks base method.
func (*MockConn) SetReadDeadline ¶
SetReadDeadline mocks base method.
func (*MockConn) SetReadLimit ¶
SetReadLimit mocks base method.
func (*MockConn) SetUser ¶
func (m *MockConn) SetUser(arg0 *schematype.UserInfo)
SetUser mocks base method.
func (*MockConn) SetWriteDeadline ¶
SetWriteDeadline mocks base method.
type MockConnMockRecorder ¶
type MockConnMockRecorder struct {
// contains filtered or unexported fields
}
MockConnMockRecorder is the mock recorder for MockConn.
func (*MockConnMockRecorder) AddCancelDeployTask ¶
func (mr *MockConnMockRecorder) AddCancelDeployTask(arg0, arg1 any) *gomock.Call
AddCancelDeployTask indicates an expected call of AddCancelDeployTask.
func (*MockConnMockRecorder) Close ¶
func (mr *MockConnMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockConnMockRecorder) CloseAndClean ¶
func (mr *MockConnMockRecorder) CloseAndClean(arg0 any) *gomock.Call
CloseAndClean indicates an expected call of CloseAndClean.
func (*MockConnMockRecorder) ClosePty ¶
func (mr *MockConnMockRecorder) ClosePty(arg0, arg1, arg2, arg3 any) *gomock.Call
ClosePty indicates an expected call of ClosePty.
func (*MockConnMockRecorder) GetPtyHandler ¶
func (mr *MockConnMockRecorder) GetPtyHandler(arg0 any) *gomock.Call
GetPtyHandler indicates an expected call of GetPtyHandler.
func (*MockConnMockRecorder) GetUser ¶
func (mr *MockConnMockRecorder) GetUser() *gomock.Call
GetUser indicates an expected call of GetUser.
func (*MockConnMockRecorder) ID ¶
func (mr *MockConnMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockConnMockRecorder) NextWriter ¶
func (mr *MockConnMockRecorder) NextWriter(arg0 any) *gomock.Call
NextWriter indicates an expected call of NextWriter.
func (*MockConnMockRecorder) PubSub ¶
func (mr *MockConnMockRecorder) PubSub() *gomock.Call
PubSub indicates an expected call of PubSub.
func (*MockConnMockRecorder) ReadMessage ¶
func (mr *MockConnMockRecorder) ReadMessage() *gomock.Call
ReadMessage indicates an expected call of ReadMessage.
func (*MockConnMockRecorder) RemoveCancelDeployTask ¶
func (mr *MockConnMockRecorder) RemoveCancelDeployTask(arg0 any) *gomock.Call
RemoveCancelDeployTask indicates an expected call of RemoveCancelDeployTask.
func (*MockConnMockRecorder) RunCancelDeployTask ¶
func (mr *MockConnMockRecorder) RunCancelDeployTask(arg0 any) *gomock.Call
RunCancelDeployTask indicates an expected call of RunCancelDeployTask.
func (*MockConnMockRecorder) SetPongHandler ¶
func (mr *MockConnMockRecorder) SetPongHandler(arg0 any) *gomock.Call
SetPongHandler indicates an expected call of SetPongHandler.
func (*MockConnMockRecorder) SetPtyHandler ¶
func (mr *MockConnMockRecorder) SetPtyHandler(arg0, arg1 any) *gomock.Call
SetPtyHandler indicates an expected call of SetPtyHandler.
func (*MockConnMockRecorder) SetReadDeadline ¶
func (mr *MockConnMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
SetReadDeadline indicates an expected call of SetReadDeadline.
func (*MockConnMockRecorder) SetReadLimit ¶
func (mr *MockConnMockRecorder) SetReadLimit(arg0 any) *gomock.Call
SetReadLimit indicates an expected call of SetReadLimit.
func (*MockConnMockRecorder) SetUser ¶
func (mr *MockConnMockRecorder) SetUser(arg0 any) *gomock.Call
SetUser indicates an expected call of SetUser.
func (*MockConnMockRecorder) SetWriteDeadline ¶
func (mr *MockConnMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
SetWriteDeadline indicates an expected call of SetWriteDeadline.
func (*MockConnMockRecorder) UID ¶
func (mr *MockConnMockRecorder) UID() *gomock.Call
UID indicates an expected call of UID.
func (*MockConnMockRecorder) WriteMessage ¶
func (mr *MockConnMockRecorder) WriteMessage(arg0, arg1 any) *gomock.Call
WriteMessage indicates an expected call of WriteMessage.
type MockDeployMsger ¶
type MockDeployMsger struct {
// contains filtered or unexported fields
}
MockDeployMsger is a mock of DeployMsger interface.
func NewMockDeployMsger ¶
func NewMockDeployMsger(ctrl *gomock.Controller) *MockDeployMsger
NewMockDeployMsger creates a new mock instance.
func (*MockDeployMsger) Current ¶
func (m *MockDeployMsger) Current() int64
Current mocks base method.
func (*MockDeployMsger) EXPECT ¶
func (m *MockDeployMsger) EXPECT() *MockDeployMsgerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDeployMsger) SendDeployedResult ¶
func (m *MockDeployMsger) SendDeployedResult(arg0 websocket.ResultType, arg1 string, arg2 *types.ProjectModel)
SendDeployedResult mocks base method.
func (*MockDeployMsger) SendEndError ¶
func (m *MockDeployMsger) SendEndError(arg0 error)
SendEndError mocks base method.
func (*MockDeployMsger) SendMsg ¶
func (m *MockDeployMsger) SendMsg(arg0 string)
SendMsg mocks base method.
func (*MockDeployMsger) SendMsgWithContainerLog ¶
func (m *MockDeployMsger) SendMsgWithContainerLog(arg0 string, arg1 []*websocket.Container)
SendMsgWithContainerLog mocks base method.
func (*MockDeployMsger) SendProcessPercent ¶
func (m *MockDeployMsger) SendProcessPercent(arg0 int64)
SendProcessPercent mocks base method.
func (*MockDeployMsger) SendProtoMsg ¶
func (m *MockDeployMsger) SendProtoMsg(arg0 application.WebsocketMessage)
SendProtoMsg mocks base method.
type MockDeployMsgerMockRecorder ¶
type MockDeployMsgerMockRecorder struct {
// contains filtered or unexported fields
}
MockDeployMsgerMockRecorder is the mock recorder for MockDeployMsger.
func (*MockDeployMsgerMockRecorder) Add ¶
func (mr *MockDeployMsgerMockRecorder) Add() *gomock.Call
Add indicates an expected call of Add.
func (*MockDeployMsgerMockRecorder) Current ¶
func (mr *MockDeployMsgerMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current.
func (*MockDeployMsgerMockRecorder) SendDeployedResult ¶
func (mr *MockDeployMsgerMockRecorder) SendDeployedResult(arg0, arg1, arg2 any) *gomock.Call
SendDeployedResult indicates an expected call of SendDeployedResult.
func (*MockDeployMsgerMockRecorder) SendEndError ¶
func (mr *MockDeployMsgerMockRecorder) SendEndError(arg0 any) *gomock.Call
SendEndError indicates an expected call of SendEndError.
func (*MockDeployMsgerMockRecorder) SendMsg ¶
func (mr *MockDeployMsgerMockRecorder) SendMsg(arg0 any) *gomock.Call
SendMsg indicates an expected call of SendMsg.
func (*MockDeployMsgerMockRecorder) SendMsgWithContainerLog ¶
func (mr *MockDeployMsgerMockRecorder) SendMsgWithContainerLog(arg0, arg1 any) *gomock.Call
SendMsgWithContainerLog indicates an expected call of SendMsgWithContainerLog.
func (*MockDeployMsgerMockRecorder) SendProcessPercent ¶
func (mr *MockDeployMsgerMockRecorder) SendProcessPercent(arg0 any) *gomock.Call
SendProcessPercent indicates an expected call of SendProcessPercent.
func (*MockDeployMsgerMockRecorder) SendProtoMsg ¶
func (mr *MockDeployMsgerMockRecorder) SendProtoMsg(arg0 any) *gomock.Call
SendProtoMsg indicates an expected call of SendProtoMsg.
type MockGorillaWs ¶
type MockGorillaWs struct {
// contains filtered or unexported fields
}
MockGorillaWs is a mock of GorillaWs interface.
func NewMockGorillaWs ¶
func NewMockGorillaWs(ctrl *gomock.Controller) *MockGorillaWs
NewMockGorillaWs creates a new mock instance.
func (*MockGorillaWs) EXPECT ¶
func (m *MockGorillaWs) EXPECT() *MockGorillaWsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGorillaWs) NextWriter ¶
func (m *MockGorillaWs) NextWriter(arg0 int) (io.WriteCloser, error)
NextWriter mocks base method.
func (*MockGorillaWs) ReadMessage ¶
func (m *MockGorillaWs) ReadMessage() (int, []byte, error)
ReadMessage mocks base method.
func (*MockGorillaWs) SetPongHandler ¶
func (m *MockGorillaWs) SetPongHandler(arg0 func(string) error)
SetPongHandler mocks base method.
func (*MockGorillaWs) SetReadDeadline ¶
func (m *MockGorillaWs) SetReadDeadline(arg0 time.Time) error
SetReadDeadline mocks base method.
func (*MockGorillaWs) SetReadLimit ¶
func (m *MockGorillaWs) SetReadLimit(arg0 int64)
SetReadLimit mocks base method.
func (*MockGorillaWs) SetWriteDeadline ¶
func (m *MockGorillaWs) SetWriteDeadline(arg0 time.Time) error
SetWriteDeadline mocks base method.
func (*MockGorillaWs) WriteMessage ¶
func (m *MockGorillaWs) WriteMessage(arg0 int, arg1 []byte) error
WriteMessage mocks base method.
type MockGorillaWsMockRecorder ¶
type MockGorillaWsMockRecorder struct {
// contains filtered or unexported fields
}
MockGorillaWsMockRecorder is the mock recorder for MockGorillaWs.
func (*MockGorillaWsMockRecorder) Close ¶
func (mr *MockGorillaWsMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockGorillaWsMockRecorder) NextWriter ¶
func (mr *MockGorillaWsMockRecorder) NextWriter(arg0 any) *gomock.Call
NextWriter indicates an expected call of NextWriter.
func (*MockGorillaWsMockRecorder) ReadMessage ¶
func (mr *MockGorillaWsMockRecorder) ReadMessage() *gomock.Call
ReadMessage indicates an expected call of ReadMessage.
func (*MockGorillaWsMockRecorder) SetPongHandler ¶
func (mr *MockGorillaWsMockRecorder) SetPongHandler(arg0 any) *gomock.Call
SetPongHandler indicates an expected call of SetPongHandler.
func (*MockGorillaWsMockRecorder) SetReadDeadline ¶
func (mr *MockGorillaWsMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
SetReadDeadline indicates an expected call of SetReadDeadline.
func (*MockGorillaWsMockRecorder) SetReadLimit ¶
func (mr *MockGorillaWsMockRecorder) SetReadLimit(arg0 any) *gomock.Call
SetReadLimit indicates an expected call of SetReadLimit.
func (*MockGorillaWsMockRecorder) SetWriteDeadline ¶
func (mr *MockGorillaWsMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
SetWriteDeadline indicates an expected call of SetWriteDeadline.
func (*MockGorillaWsMockRecorder) WriteMessage ¶
func (mr *MockGorillaWsMockRecorder) WriteMessage(arg0, arg1 any) *gomock.Call
WriteMessage indicates an expected call of WriteMessage.
type MockJob ¶
type MockJob struct {
// contains filtered or unexported fields
}
MockJob is a mock of Job interface.
func NewMockJob ¶
func NewMockJob(ctrl *gomock.Controller) *MockJob
NewMockJob creates a new mock instance.
func (*MockJob) EXPECT ¶
func (m *MockJob) EXPECT() *MockJobMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockJobManager ¶
type MockJobManager struct {
// contains filtered or unexported fields
}
MockJobManager is a mock of JobManager interface.
func NewMockJobManager ¶
func NewMockJobManager(ctrl *gomock.Controller) *MockJobManager
NewMockJobManager creates a new mock instance.
func (*MockJobManager) EXPECT ¶
func (m *MockJobManager) EXPECT() *MockJobManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockJobManager) NewJob ¶
func (m *MockJobManager) NewJob(arg0 *JobInput) Job
NewJob mocks base method.
type MockJobManagerMockRecorder ¶
type MockJobManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockJobManagerMockRecorder is the mock recorder for MockJobManager.
type MockJobMockRecorder ¶
type MockJobMockRecorder struct {
// contains filtered or unexported fields
}
MockJobMockRecorder is the mock recorder for MockJob.
func (*MockJobMockRecorder) Error ¶
func (mr *MockJobMockRecorder) Error() *gomock.Call
Error indicates an expected call of Error.
func (*MockJobMockRecorder) Finish ¶
func (mr *MockJobMockRecorder) Finish() *gomock.Call
Finish indicates an expected call of Finish.
func (*MockJobMockRecorder) GlobalLock ¶
func (mr *MockJobMockRecorder) GlobalLock() *gomock.Call
GlobalLock indicates an expected call of GlobalLock.
func (*MockJobMockRecorder) ID ¶
func (mr *MockJobMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockJobMockRecorder) IsNotDryRun ¶
func (mr *MockJobMockRecorder) IsNotDryRun() *gomock.Call
IsNotDryRun indicates an expected call of IsNotDryRun.
func (*MockJobMockRecorder) LoadConfigs ¶
func (mr *MockJobMockRecorder) LoadConfigs() *gomock.Call
LoadConfigs indicates an expected call of LoadConfigs.
func (*MockJobMockRecorder) Manifests ¶
func (mr *MockJobMockRecorder) Manifests() *gomock.Call
Manifests indicates an expected call of Manifests.
func (*MockJobMockRecorder) OnError ¶
func (mr *MockJobMockRecorder) OnError(arg0, arg1 any) *gomock.Call
OnError indicates an expected call of OnError.
func (*MockJobMockRecorder) OnFinally ¶
func (mr *MockJobMockRecorder) OnFinally(arg0, arg1 any) *gomock.Call
OnFinally indicates an expected call of OnFinally.
func (*MockJobMockRecorder) OnSuccess ¶
func (mr *MockJobMockRecorder) OnSuccess(arg0, arg1 any) *gomock.Call
OnSuccess indicates an expected call of OnSuccess.
func (*MockJobMockRecorder) Project ¶
func (mr *MockJobMockRecorder) Project() *gomock.Call
Project indicates an expected call of Project.
func (*MockJobMockRecorder) Run ¶
func (mr *MockJobMockRecorder) Run(arg0 any) *gomock.Call
Run indicates an expected call of Run.
func (*MockJobMockRecorder) Stop ¶
func (mr *MockJobMockRecorder) Stop(arg0 any) *gomock.Call
Stop indicates an expected call of Stop.
func (*MockJobMockRecorder) Validate ¶
func (mr *MockJobMockRecorder) Validate() *gomock.Call
Validate indicates an expected call of Validate.
type MockPercentable ¶
type MockPercentable struct {
// contains filtered or unexported fields
}
MockPercentable is a mock of Percentable interface.
func NewMockPercentable ¶
func NewMockPercentable(ctrl *gomock.Controller) *MockPercentable
NewMockPercentable creates a new mock instance.
func (*MockPercentable) Current ¶
func (m *MockPercentable) Current() int64
Current mocks base method.
func (*MockPercentable) EXPECT ¶
func (m *MockPercentable) EXPECT() *MockPercentableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPercentableMockRecorder ¶
type MockPercentableMockRecorder struct {
// contains filtered or unexported fields
}
MockPercentableMockRecorder is the mock recorder for MockPercentable.
func (*MockPercentableMockRecorder) Add ¶
func (mr *MockPercentableMockRecorder) Add() *gomock.Call
Add indicates an expected call of Add.
func (*MockPercentableMockRecorder) Current ¶
func (mr *MockPercentableMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current.
type MockPtyHandler ¶
type MockPtyHandler struct {
// contains filtered or unexported fields
}
MockPtyHandler is a mock of PtyHandler interface.
func NewMockPtyHandler ¶
func NewMockPtyHandler(ctrl *gomock.Controller) *MockPtyHandler
NewMockPtyHandler creates a new mock instance.
func (*MockPtyHandler) Close ¶
func (m *MockPtyHandler) Close(arg0 context.Context, arg1 string) bool
Close mocks base method.
func (*MockPtyHandler) Container ¶
func (m *MockPtyHandler) Container() *repo.Container
Container mocks base method.
func (*MockPtyHandler) EXPECT ¶
func (m *MockPtyHandler) EXPECT() *MockPtyHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPtyHandler) IsClosed ¶
func (m *MockPtyHandler) IsClosed() bool
IsClosed mocks base method.
func (*MockPtyHandler) Next ¶
func (m *MockPtyHandler) Next() *remotecommand.TerminalSize
Next mocks base method.
func (*MockPtyHandler) Read ¶
func (m *MockPtyHandler) Read(arg0 []byte) (int, error)
Read mocks base method.
func (*MockPtyHandler) Recorder ¶
func (m *MockPtyHandler) Recorder() repo.Recorder
Recorder mocks base method.
func (*MockPtyHandler) ResetTerminalRowCol ¶
func (m *MockPtyHandler) ResetTerminalRowCol(arg0 bool)
ResetTerminalRowCol mocks base method.
func (*MockPtyHandler) Resize ¶
func (m *MockPtyHandler) Resize(arg0 remotecommand.TerminalSize) error
Resize mocks base method.
func (*MockPtyHandler) Send ¶
func (m *MockPtyHandler) Send(arg0 context.Context, arg1 *websocket.TerminalMessage) error
Send mocks base method.
func (*MockPtyHandler) SetShell ¶
func (m *MockPtyHandler) SetShell(arg0 string)
SetShell mocks base method.
func (*MockPtyHandler) Toast ¶
func (m *MockPtyHandler) Toast(arg0 string) error
Toast mocks base method.
type MockPtyHandlerMockRecorder ¶
type MockPtyHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockPtyHandlerMockRecorder is the mock recorder for MockPtyHandler.
func (*MockPtyHandlerMockRecorder) Close ¶
func (mr *MockPtyHandlerMockRecorder) Close(arg0, arg1 any) *gomock.Call
Close indicates an expected call of Close.
func (*MockPtyHandlerMockRecorder) Cols ¶
func (mr *MockPtyHandlerMockRecorder) Cols() *gomock.Call
Cols indicates an expected call of Cols.
func (*MockPtyHandlerMockRecorder) Container ¶
func (mr *MockPtyHandlerMockRecorder) Container() *gomock.Call
Container indicates an expected call of Container.
func (*MockPtyHandlerMockRecorder) IsClosed ¶
func (mr *MockPtyHandlerMockRecorder) IsClosed() *gomock.Call
IsClosed indicates an expected call of IsClosed.
func (*MockPtyHandlerMockRecorder) Next ¶
func (mr *MockPtyHandlerMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next.
func (*MockPtyHandlerMockRecorder) Read ¶
func (mr *MockPtyHandlerMockRecorder) Read(arg0 any) *gomock.Call
Read indicates an expected call of Read.
func (*MockPtyHandlerMockRecorder) Recorder ¶
func (mr *MockPtyHandlerMockRecorder) Recorder() *gomock.Call
Recorder indicates an expected call of Recorder.
func (*MockPtyHandlerMockRecorder) ResetTerminalRowCol ¶
func (mr *MockPtyHandlerMockRecorder) ResetTerminalRowCol(arg0 any) *gomock.Call
ResetTerminalRowCol indicates an expected call of ResetTerminalRowCol.
func (*MockPtyHandlerMockRecorder) Resize ¶
func (mr *MockPtyHandlerMockRecorder) Resize(arg0 any) *gomock.Call
Resize indicates an expected call of Resize.
func (*MockPtyHandlerMockRecorder) Rows ¶
func (mr *MockPtyHandlerMockRecorder) Rows() *gomock.Call
Rows indicates an expected call of Rows.
func (*MockPtyHandlerMockRecorder) Send ¶
func (mr *MockPtyHandlerMockRecorder) Send(arg0, arg1 any) *gomock.Call
Send indicates an expected call of Send.
func (*MockPtyHandlerMockRecorder) SetShell ¶
func (mr *MockPtyHandlerMockRecorder) SetShell(arg0 any) *gomock.Call
SetShell indicates an expected call of SetShell.
type MockReleaseInstaller ¶
type MockReleaseInstaller struct {
// contains filtered or unexported fields
}
MockReleaseInstaller is a mock of ReleaseInstaller interface.
func NewMockReleaseInstaller ¶
func NewMockReleaseInstaller(ctrl *gomock.Controller) *MockReleaseInstaller
NewMockReleaseInstaller creates a new mock instance.
func (*MockReleaseInstaller) EXPECT ¶
func (m *MockReleaseInstaller) EXPECT() *MockReleaseInstallerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReleaseInstaller) Run ¶
func (m *MockReleaseInstaller) Run(arg0 context.Context, arg1 *InstallInput) (*release.Release, error)
Run mocks base method.
type MockReleaseInstallerMockRecorder ¶
type MockReleaseInstallerMockRecorder struct {
// contains filtered or unexported fields
}
MockReleaseInstallerMockRecorder is the mock recorder for MockReleaseInstaller.
type MockSafeWriteMessageChan ¶
type MockSafeWriteMessageChan struct {
// contains filtered or unexported fields
}
MockSafeWriteMessageChan is a mock of SafeWriteMessageChan interface.
func NewMockSafeWriteMessageChan ¶
func NewMockSafeWriteMessageChan(ctrl *gomock.Controller) *MockSafeWriteMessageChan
NewMockSafeWriteMessageChan creates a new mock instance.
func (*MockSafeWriteMessageChan) Chan ¶
func (m *MockSafeWriteMessageChan) Chan() <-chan MessageItem
Chan mocks base method.
func (*MockSafeWriteMessageChan) Close ¶
func (m *MockSafeWriteMessageChan) Close()
Close mocks base method.
func (*MockSafeWriteMessageChan) EXPECT ¶
func (m *MockSafeWriteMessageChan) EXPECT() *MockSafeWriteMessageChanMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSafeWriteMessageChan) Send ¶
func (m *MockSafeWriteMessageChan) Send(arg0 MessageItem)
Send mocks base method.
type MockSafeWriteMessageChanMockRecorder ¶
type MockSafeWriteMessageChanMockRecorder struct {
// contains filtered or unexported fields
}
MockSafeWriteMessageChanMockRecorder is the mock recorder for MockSafeWriteMessageChan.
func (*MockSafeWriteMessageChanMockRecorder) Chan ¶
func (mr *MockSafeWriteMessageChanMockRecorder) Chan() *gomock.Call
Chan indicates an expected call of Chan.
func (*MockSafeWriteMessageChanMockRecorder) Close ¶
func (mr *MockSafeWriteMessageChanMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
type MockSessionMapper ¶
type MockSessionMapper struct {
// contains filtered or unexported fields
}
MockSessionMapper is a mock of SessionMapper interface.
func NewMockSessionMapper ¶
func NewMockSessionMapper(ctrl *gomock.Controller) *MockSessionMapper
NewMockSessionMapper creates a new mock instance.
func (*MockSessionMapper) CloseAll ¶
func (m *MockSessionMapper) CloseAll(arg0 context.Context)
CloseAll mocks base method.
func (*MockSessionMapper) EXPECT ¶
func (m *MockSessionMapper) EXPECT() *MockSessionMapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSessionMapper) Get ¶
func (m *MockSessionMapper) Get(arg0 string) (PtyHandler, bool)
Get mocks base method.
func (*MockSessionMapper) Set ¶
func (m *MockSessionMapper) Set(arg0 string, arg1 PtyHandler)
Set mocks base method.
type MockSessionMapperMockRecorder ¶
type MockSessionMapperMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionMapperMockRecorder is the mock recorder for MockSessionMapper.
func (*MockSessionMapperMockRecorder) Close ¶
func (mr *MockSessionMapperMockRecorder) Close(arg0, arg1, arg2, arg3 any) *gomock.Call
Close indicates an expected call of Close.
func (*MockSessionMapperMockRecorder) CloseAll ¶
func (mr *MockSessionMapperMockRecorder) CloseAll(arg0 any) *gomock.Call
CloseAll indicates an expected call of CloseAll.
type MockTaskManager ¶
type MockTaskManager struct {
// contains filtered or unexported fields
}
MockTaskManager is a mock of TaskManager interface.
func NewMockTaskManager ¶
func NewMockTaskManager(ctrl *gomock.Controller) *MockTaskManager
NewMockTaskManager creates a new mock instance.
func (*MockTaskManager) EXPECT ¶
func (m *MockTaskManager) EXPECT() *MockTaskManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskManager) Has ¶
func (m *MockTaskManager) Has(arg0 string) bool
Has mocks base method.
func (*MockTaskManager) Register ¶
func (m *MockTaskManager) Register(arg0 string, arg1 func(error)) error
Register mocks base method.
func (*MockTaskManager) Remove ¶
func (m *MockTaskManager) Remove(arg0 string)
Remove mocks base method.
type MockTaskManagerMockRecorder ¶
type MockTaskManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskManagerMockRecorder is the mock recorder for MockTaskManager.
func (*MockTaskManagerMockRecorder) Has ¶
func (mr *MockTaskManagerMockRecorder) Has(arg0 any) *gomock.Call
Has indicates an expected call of Has.
func (*MockTaskManagerMockRecorder) Register ¶
func (mr *MockTaskManagerMockRecorder) Register(arg0, arg1 any) *gomock.Call
Register indicates an expected call of Register.
func (*MockTaskManagerMockRecorder) Remove ¶
func (mr *MockTaskManagerMockRecorder) Remove(arg0 any) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockTaskManagerMockRecorder) Stop ¶
func (mr *MockTaskManagerMockRecorder) Stop(arg0 any) *gomock.Call
Stop indicates an expected call of Stop.
func (*MockTaskManagerMockRecorder) StopAll ¶
func (mr *MockTaskManagerMockRecorder) StopAll() *gomock.Call
StopAll indicates an expected call of StopAll.
type Percentable ¶
func NewProcessPercent ¶
func NewProcessPercent(sender DeployMsger, s Sleeper) Percentable
type PtyHandler ¶
type PtyHandler interface { io.Reader io.Writer remotecommand.TerminalSizeQueue Container() *repo.Container SetShell(string) Toast(string) error Send(ctx context.Context, message *websocket_pb.TerminalMessage) error Resize(remotecommand.TerminalSize) error Recorder() repo.Recorder ResetTerminalRowCol(bool) Rows() uint16 Cols() uint16 Close(context.Context, string) bool IsClosed() bool }
type ReleaseInstaller ¶
type ReleaseInstaller interface {
Run(ctx context.Context, input *InstallInput) (*release.Release, error)
}
func NewReleaseInstaller ¶
func NewReleaseInstaller( logger mlog.Logger, helmer repo.HelmerRepo, data data.Data, timer timer.Timer, ) ReleaseInstaller
type SafeWriteMessageChan ¶
type SafeWriteMessageChan interface { Close() Chan() <-chan MessageItem Send(m MessageItem) }
func NewSafeWriteMessageCh ¶
func NewSafeWriteMessageCh(logger mlog.Logger, chSize int) SafeWriteMessageChan
type SessionMapper ¶
type SessionMapper interface { Get(sessionId string) (PtyHandler, bool) Set(sessionId string, session PtyHandler) CloseAll(ctx context.Context) Close(ctx context.Context, sessionId string, status uint32, reason string) }
func NewSessionMap ¶
func NewSessionMap(logger mlog.Logger) SessionMapper
type Sleeper ¶
func NewRealSleeper ¶
func NewRealSleeper() Sleeper
type SystemVariableLoader ¶
type SystemVariableLoader struct {
// contains filtered or unexported fields
}
SystemVariableLoader 系统内置变量替换, values.yaml 中的 <.var> 变量 例如:<.Branch> <.Commit> <.Pipeline> <.Host1> <.TlsSecret1>
func (*SystemVariableLoader) Add ¶
func (v *SystemVariableLoader) Add(key, value string)
func (*SystemVariableLoader) Load ¶
func (v *SystemVariableLoader) Load(j *jobRunner) error
type TaskManager ¶
type TaskManager interface { Remove(id string) Has(id string) bool Stop(id string) Register(id string, fn func(error)) error StopAll() }
func NewTaskManager ¶
func NewTaskManager(logger mlog.Logger) TaskManager
type TerminalResponse ¶
type TerminalResponse struct {
ID string `json:"sessionID"`
}
type UserConfigLoader ¶
type UserConfigLoader struct{}
UserConfigLoader 把用户配置字段 merge 到 values.yaml 返回的应该是一个片段 ```yaml conf:
key: value
```
func (*UserConfigLoader) Load ¶
func (d *UserConfigLoader) Load(j *jobRunner) error
type WebsocketManager ¶
type WebsocketManager struct {
// contains filtered or unexported fields
}
func (*WebsocketManager) HandleAuthorize ¶
func (wc *WebsocketManager) HandleAuthorize(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleCloseShell ¶
func (wc *WebsocketManager) HandleCloseShell(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleJoinRoom ¶
func (wc *WebsocketManager) HandleJoinRoom(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleShellMessage ¶
func (wc *WebsocketManager) HandleShellMessage(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleStartShell ¶
func (wc *WebsocketManager) HandleStartShell(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleWsCancelDeploy ¶
func (wc *WebsocketManager) HandleWsCancelDeploy(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleWsCreateProject ¶
func (wc *WebsocketManager) HandleWsCreateProject(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) HandleWsUpdateProject ¶
func (wc *WebsocketManager) HandleWsUpdateProject(ctx context.Context, c Conn, t websocket_pb.Type, message []byte)
func (*WebsocketManager) Info ¶
func (wc *WebsocketManager) Info(writer http.ResponseWriter, request *http.Request)
func (*WebsocketManager) Serve ¶
func (wc *WebsocketManager) Serve(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) StartShell ¶
func (wc *WebsocketManager) StartShell(ctx context.Context, input *websocket_pb.WsHandleExecShellInput, conn Conn) (string, error)
func (*WebsocketManager) TickClusterHealth ¶
func (wc *WebsocketManager) TickClusterHealth(done <-chan struct{})
func (*WebsocketManager) WaitForTerminal ¶
func (wc *WebsocketManager) WaitForTerminal(ctx context.Context, conn Conn, container *repo.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
type WsConn ¶
type WsConn struct { GorillaWs // contains filtered or unexported fields }
func (*WsConn) AddCancelDeployTask ¶
func (*WsConn) GetPtyHandler ¶
func (c *WsConn) GetPtyHandler(sessionID string) (PtyHandler, bool)
func (*WsConn) PubSub ¶
func (c *WsConn) PubSub() application.PubSub
func (*WsConn) RemoveCancelDeployTask ¶
func (*WsConn) RunCancelDeployTask ¶
func (*WsConn) SetPtyHandler ¶
func (c *WsConn) SetPtyHandler(sessionID string, session PtyHandler)
type WsResponse ¶
type WsResponse = websocket_pb.WsMetadataResponse