Documentation ¶
Index ¶
- func CheckIfDaemonServerRunning(isSudoUser bool) bool
- type DaemonClient
- func (d *DaemonClient) SendAuthCheckCommand(ns, kubeConfigContent string, needChecks ...string) (bool, error)
- func (d *DaemonClient) SendCheckClusterStatusCommand(kubeContent string) (*daemon_common.CheckClusterStatus, error)
- func (d *DaemonClient) SendFlushDirMappingCacheCommand(ns, nid, appName string) error
- func (d *DaemonClient) SendGetApplicationMetaCommand(ns, appName, kubeConfigContent string) (interface{}, error)
- func (d *DaemonClient) SendGetApplicationMetasCommand(ns, kubeConfig string) ([]interface{}, error)
- func (d *DaemonClient) SendGetDaemonServerInfoCommand() (*daemon_common.DaemonServerInfo, error)
- func (d *DaemonClient) SendGetDaemonServerStatusCommand() (*daemon_common.DaemonServerStatusResponse, error)
- func (d *DaemonClient) SendGetResourceInfoCommand(kubeconfig, ns, appName, resource, resourceName string, ...) (interface{}, error)
- func (d *DaemonClient) SendKubeconfigOperationCommand(kubeconfigBytes []byte, ns string, operation command.Operation) error
- func (d *DaemonClient) SendRestartDaemonServerCommand() error
- func (d *DaemonClient) SendStartPortForwardCommand(nhSvc *model.NocalHostResource, localPort, remotePort int, role, nid string) error
- func (d *DaemonClient) SendStopDaemonServerCommand() error
- func (d *DaemonClient) SendStopPortForwardCommand(nhSvc *model.NocalHostResource, localPort, remotePort int) error
- func (d *DaemonClient) SendSudoVPNOperateCommand(kubeconfig, ns string, operation command.VPNOperation, ...) error
- func (d *DaemonClient) SendSudoVPNStatusCommand() (interface{}, error)
- func (d *DaemonClient) SendUpdateApplicationMetaCommand(kubeconfig, ns, secretName string, secret *v1.Secret) (bool, error)
- func (d *DaemonClient) SendVPNOperateCommand(kubeconfig, ns string, operation command.VPNOperation, workloads string, ...) error
- func (d *DaemonClient) SendVPNStatusCommand() (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DaemonClient ¶
type DaemonClient struct {
// contains filtered or unexported fields
}
func GetDaemonClient ¶
func GetDaemonClient(isSudoUser bool) (*DaemonClient, error)
func (*DaemonClient) SendAuthCheckCommand ¶
func (d *DaemonClient) SendAuthCheckCommand(ns, kubeConfigContent string, needChecks ...string) (bool, error)
func (*DaemonClient) SendCheckClusterStatusCommand ¶
func (d *DaemonClient) SendCheckClusterStatusCommand(kubeContent string) (*daemon_common.CheckClusterStatus, error)
func (*DaemonClient) SendFlushDirMappingCacheCommand ¶
func (d *DaemonClient) SendFlushDirMappingCacheCommand(ns, nid, appName string) error
func (*DaemonClient) SendGetApplicationMetaCommand ¶
func (d *DaemonClient) SendGetApplicationMetaCommand(ns, appName, kubeConfigContent string) (interface{}, error)
the reason why return a interface is applicationMeta needs to using this client, otherwise it will cause cycle import
func (*DaemonClient) SendGetApplicationMetasCommand ¶
func (d *DaemonClient) SendGetApplicationMetasCommand(ns, kubeConfig string) ([]interface{}, error)
the reason why return a interface array is applicationMeta needs to using this client, otherwise it will cause cycle import
func (*DaemonClient) SendGetDaemonServerInfoCommand ¶
func (d *DaemonClient) SendGetDaemonServerInfoCommand() (*daemon_common.DaemonServerInfo, error)
func (*DaemonClient) SendGetDaemonServerStatusCommand ¶
func (d *DaemonClient) SendGetDaemonServerStatusCommand() (*daemon_common.DaemonServerStatusResponse, error)
func (*DaemonClient) SendGetResourceInfoCommand ¶
func (d *DaemonClient) SendGetResourceInfoCommand( kubeconfig, ns, appName, resource, resourceName string, label map[string]string, showHidden bool, ) (interface{}, error)
SendGetAllInfoCommand send get resource info request to daemon
func (*DaemonClient) SendKubeconfigOperationCommand ¶
func (d *DaemonClient) SendKubeconfigOperationCommand(kubeconfigBytes []byte, ns string, operation command.Operation) error
SendKubeconfigOperationCommand send add/remove kubeconfig request to daemon
func (*DaemonClient) SendRestartDaemonServerCommand ¶
func (d *DaemonClient) SendRestartDaemonServerCommand() error
SendRestartDaemonServerCommand This command tells DaemonServer to run a newer version(by sub progress) with nhctl binary in ClientPath and then stops itself. By doing this, we can make sure newer DaemonServer has the same permission with older one. DaemonServer needs to copy nhctl.exe from ClientPath to a tmpDir in Windows OS.
func (*DaemonClient) SendStartPortForwardCommand ¶
func (d *DaemonClient) SendStartPortForwardCommand( nhSvc *model.NocalHostResource, localPort, remotePort int, role, nid string, ) error
func (*DaemonClient) SendStopDaemonServerCommand ¶
func (d *DaemonClient) SendStopDaemonServerCommand() error
func (*DaemonClient) SendStopPortForwardCommand ¶
func (d *DaemonClient) SendStopPortForwardCommand(nhSvc *model.NocalHostResource, localPort, remotePort int) error
SendStopPortForwardCommand send port forward to daemon
func (*DaemonClient) SendSudoVPNOperateCommand ¶
func (d *DaemonClient) SendSudoVPNOperateCommand( kubeconfig, ns string, operation command.VPNOperation, consumer func(io.Reader) error, ) error
func (*DaemonClient) SendSudoVPNStatusCommand ¶
func (d *DaemonClient) SendSudoVPNStatusCommand() (interface{}, error)
func (*DaemonClient) SendUpdateApplicationMetaCommand ¶
func (d *DaemonClient) SendUpdateApplicationMetaCommand( kubeconfig, ns, secretName string, secret *v1.Secret, ) (bool, error)
SendGetAllInfoCommand send get resource info request to daemon
func (*DaemonClient) SendVPNOperateCommand ¶
func (d *DaemonClient) SendVPNOperateCommand( kubeconfig, ns string, operation command.VPNOperation, workloads string, consumer func(io.Reader) error, ) error
func (*DaemonClient) SendVPNStatusCommand ¶
func (d *DaemonClient) SendVPNStatusCommand() (interface{}, error)