daemon_client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfDaemonServerRunning

func CheckIfDaemonServerRunning(isSudoUser bool) bool

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)

Jump to

Keyboard shortcuts

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