Documentation ¶
Index ¶
- func GetTerminalAccessConfig() (*models.UserTerminalSessionConfig, error)
- type ManifestEditResponse
- type UserTerminalAccessService
- type UserTerminalAccessServiceImpl
- func (impl *UserTerminalAccessServiceImpl) DeleteTerminalPod(ctx context.Context, clusterId int, terminalPodName string, namespace string) error
- func (impl *UserTerminalAccessServiceImpl) DeleteTerminalResource(ctx context.Context, clusterId int, terminalResourceName string, ...) error
- func (impl *UserTerminalAccessServiceImpl) DisconnectAllSessionsForUser(ctx context.Context, userId int32)
- func (impl *UserTerminalAccessServiceImpl) DisconnectTerminalSession(ctx context.Context, userTerminalAccessId int) error
- func (impl *UserTerminalAccessServiceImpl) EditTerminalPodManifest(ctx context.Context, editManifestRequest *models.UserTerminalSessionRequest, ...) (ManifestEditResponse, error)
- func (impl *UserTerminalAccessServiceImpl) FetchPodEvents(ctx context.Context, userTerminalAccessId int) (*models.UserTerminalPodEvents, error)
- func (impl *UserTerminalAccessServiceImpl) FetchPodManifest(ctx context.Context, userTerminalAccessId int) (resp *k8s2.ManifestResponse, err error)
- func (impl *UserTerminalAccessServiceImpl) FetchTerminalStatus(ctx context.Context, terminalAccessId int, namespace string, ...) (*models.UserTerminalSessionResponse, error)
- func (impl *UserTerminalAccessServiceImpl) GenerateNodeDebugPod(o *models.UserTerminalSessionRequest) (*v1.Pod, error)
- func (impl *UserTerminalAccessServiceImpl) GetTerminalAccessSessionDataFromCacheById(terminalAccessId int) (*models.UserTerminalAccessData, bool)
- func (impl *UserTerminalAccessServiceImpl) StartNodeDebug(userTerminalRequest *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
- func (impl *UserTerminalAccessServiceImpl) StartTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
- func (impl *UserTerminalAccessServiceImpl) StopTerminalSession(ctx context.Context, userTerminalAccessId int)
- func (impl *UserTerminalAccessServiceImpl) SyncPodStatus()
- func (impl *UserTerminalAccessServiceImpl) SyncRunningInstances()
- func (impl *UserTerminalAccessServiceImpl) UpdateTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
- func (impl *UserTerminalAccessServiceImpl) UpdateTerminalShellSession(ctx context.Context, request *models.UserTerminalShellSessionRequest) (*models.UserTerminalSessionResponse, error)
- func (impl *UserTerminalAccessServiceImpl) ValidateShell(podName, namespace, shellName, containerName string, clusterId int) (bool, string, error)
- type UserTerminalAccessSessionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTerminalAccessConfig ¶
func GetTerminalAccessConfig() (*models.UserTerminalSessionConfig, error)
Types ¶
type ManifestEditResponse ¶ added in v0.6.19
type ManifestEditResponse struct { ErrorComments string `json:"errors,omitempty"` ManifestResponse *k8s2.ManifestResponse `json:"manifestResponse"` models.UserTerminalSessionResponse }
type UserTerminalAccessService ¶
type UserTerminalAccessService interface { StartTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error) UpdateTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error) UpdateTerminalShellSession(ctx context.Context, request *models.UserTerminalShellSessionRequest) (*models.UserTerminalSessionResponse, error) FetchTerminalStatus(ctx context.Context, terminalAccessId int, namespace string, containerName string, shellName string) (*models.UserTerminalSessionResponse, error) StopTerminalSession(ctx context.Context, userTerminalAccessId int) DisconnectTerminalSession(ctx context.Context, userTerminalAccessId int) error DisconnectAllSessionsForUser(ctx context.Context, userId int32) FetchPodManifest(ctx context.Context, userTerminalAccessId int) (resp *k8s2.ManifestResponse, err error) FetchPodEvents(ctx context.Context, userTerminalAccessId int) (*models.UserTerminalPodEvents, error) ValidateShell(podName, namespace, shellName, containerName string, clusterId int) (bool, string, error) EditTerminalPodManifest(ctx context.Context, request *models.UserTerminalSessionRequest, override bool) (ManifestEditResponse, error) GetTerminalAccessSessionDataFromCacheById(terminalAccessId int) (*models.UserTerminalAccessData, bool) }
type UserTerminalAccessServiceImpl ¶
type UserTerminalAccessServiceImpl struct { TerminalAccessRepository repository.TerminalAccessRepository Logger *zap.SugaredLogger Config *models.UserTerminalSessionConfig TerminalAccessSessionDataMap *map[int]*UserTerminalAccessSessionData TerminalAccessDataArrayMutex *sync.RWMutex PodStatusSyncCron *cron.Cron K8sCommonService k8s.K8sCommonService K8sCapacityService capacity.K8sCapacityService // contains filtered or unexported fields }
func NewUserTerminalAccessServiceImpl ¶
func NewUserTerminalAccessServiceImpl(logger *zap.SugaredLogger, terminalAccessRepository repository.TerminalAccessRepository, config *models.UserTerminalSessionConfig, k8sCommonService k8s.K8sCommonService, terminalSessionHandler terminal.TerminalSessionHandler, K8sCapacityService capacity.K8sCapacityService, k8sUtil *k8s2.K8sServiceImpl, cronLogger *cron3.CronLoggerImpl) (*UserTerminalAccessServiceImpl, error)
func (*UserTerminalAccessServiceImpl) DeleteTerminalPod ¶
func (*UserTerminalAccessServiceImpl) DeleteTerminalResource ¶
func (*UserTerminalAccessServiceImpl) DisconnectAllSessionsForUser ¶
func (impl *UserTerminalAccessServiceImpl) DisconnectAllSessionsForUser(ctx context.Context, userId int32)
func (*UserTerminalAccessServiceImpl) DisconnectTerminalSession ¶
func (impl *UserTerminalAccessServiceImpl) DisconnectTerminalSession(ctx context.Context, userTerminalAccessId int) error
func (*UserTerminalAccessServiceImpl) EditTerminalPodManifest ¶ added in v0.6.19
func (impl *UserTerminalAccessServiceImpl) EditTerminalPodManifest(ctx context.Context, editManifestRequest *models.UserTerminalSessionRequest, override bool) (ManifestEditResponse, error)
func (*UserTerminalAccessServiceImpl) FetchPodEvents ¶
func (impl *UserTerminalAccessServiceImpl) FetchPodEvents(ctx context.Context, userTerminalAccessId int) (*models.UserTerminalPodEvents, error)
func (*UserTerminalAccessServiceImpl) FetchPodManifest ¶
func (impl *UserTerminalAccessServiceImpl) FetchPodManifest(ctx context.Context, userTerminalAccessId int) (resp *k8s2.ManifestResponse, err error)
func (*UserTerminalAccessServiceImpl) FetchTerminalStatus ¶
func (impl *UserTerminalAccessServiceImpl) FetchTerminalStatus(ctx context.Context, terminalAccessId int, namespace string, containerName string, shellName string) (*models.UserTerminalSessionResponse, error)
func (*UserTerminalAccessServiceImpl) GenerateNodeDebugPod ¶ added in v0.6.19
func (impl *UserTerminalAccessServiceImpl) GenerateNodeDebugPod(o *models.UserTerminalSessionRequest) (*v1.Pod, error)
func (*UserTerminalAccessServiceImpl) GetTerminalAccessSessionDataFromCacheById ¶ added in v1.1.0
func (impl *UserTerminalAccessServiceImpl) GetTerminalAccessSessionDataFromCacheById(terminalAccessId int) (*models.UserTerminalAccessData, bool)
func (*UserTerminalAccessServiceImpl) StartNodeDebug ¶ added in v0.6.19
func (impl *UserTerminalAccessServiceImpl) StartNodeDebug(userTerminalRequest *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
func (*UserTerminalAccessServiceImpl) StartTerminalSession ¶
func (impl *UserTerminalAccessServiceImpl) StartTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
func (*UserTerminalAccessServiceImpl) StopTerminalSession ¶
func (impl *UserTerminalAccessServiceImpl) StopTerminalSession(ctx context.Context, userTerminalAccessId int)
func (*UserTerminalAccessServiceImpl) SyncPodStatus ¶
func (impl *UserTerminalAccessServiceImpl) SyncPodStatus()
func (*UserTerminalAccessServiceImpl) SyncRunningInstances ¶
func (impl *UserTerminalAccessServiceImpl) SyncRunningInstances()
func (*UserTerminalAccessServiceImpl) UpdateTerminalSession ¶
func (impl *UserTerminalAccessServiceImpl) UpdateTerminalSession(ctx context.Context, request *models.UserTerminalSessionRequest) (*models.UserTerminalSessionResponse, error)
func (*UserTerminalAccessServiceImpl) UpdateTerminalShellSession ¶
func (impl *UserTerminalAccessServiceImpl) UpdateTerminalShellSession(ctx context.Context, request *models.UserTerminalShellSessionRequest) (*models.UserTerminalSessionResponse, error)
func (*UserTerminalAccessServiceImpl) ValidateShell ¶ added in v0.6.15
type UserTerminalAccessSessionData ¶
type UserTerminalAccessSessionData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.