daemon -> agent (#463)

This commit is contained in:
Michael Quigley 2024-08-22 11:02:33 -04:00
parent 2d33c99902
commit 83ad5dde6d
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
package daemon
package agent
type Daemon struct {
shares map[string]*share

View File

@ -1,4 +1,4 @@
package daemon
package agent
import (
"github.com/openziti/zrok/sdk/golang/sdk"

View File

@ -7,25 +7,25 @@ import (
)
func init() {
rootCmd.AddCommand(newDaemonCommand().cmd)
rootCmd.AddCommand(newAgentCommand().cmd)
}
type daemonCommand struct {
type agentCommand struct {
cmd *cobra.Command
}
func newDaemonCommand() *daemonCommand {
func newAgentCommand() *agentCommand {
cmd := &cobra.Command{
Use: "daemon",
Short: "Launch a zrok daemon",
Use: "agent",
Short: "Launch a zrok agent",
Args: cobra.NoArgs,
}
command := &daemonCommand{cmd: cmd}
command := &agentCommand{cmd: cmd}
cmd.Run = command.run
return command
}
func (cmd *daemonCommand) run(_ *cobra.Command, _ []string) {
func (cmd *agentCommand) run(_ *cobra.Command, _ []string) {
root, err := environment.LoadRoot()
if err != nil {
tui.Error("error loading zrokdir", err)