Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AgentCmd = &cobra.Command{ Use: "agent", Short: "Start the agent process", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { agentMode := config.ModeProject if hostModeFlag { agentMode = config.ModeHost } config, err := config.GetConfig(agentMode) if err != nil { log.Fatal(err) } git := &git.Service{ ProjectDir: config.ProjectDir, GitConfigFileName: path.Join(os.Getenv("HOME"), ".gitconfig"), } sshServer := &ssh.Server{ ProjectDir: config.ProjectDir, DefaultProjectDir: os.Getenv("HOME"), } tailscaleHostname := fmt.Sprintf("%s-%s", config.WorkspaceId, config.ProjectName) if hostModeFlag { tailscaleHostname = config.WorkspaceId } tailscaleServer := &tailscale.Server{ Hostname: tailscaleHostname, ServerUrl: config.Server.Url, } agent := agent.Agent{ Config: config, Git: git, Ssh: sshServer, Tailscale: tailscaleServer, } err = agent.Start() if err != nil { log.Fatal(err) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.