mirror of
https://github.com/openziti/zrok.git
synced 2024-11-26 18:13:52 +01:00
daemon -> agent (#463)
This commit is contained in:
parent
2d33c99902
commit
83ad5dde6d
@ -1,4 +1,4 @@
|
||||
package daemon
|
||||
package agent
|
||||
|
||||
type Daemon struct {
|
||||
shares map[string]*share
|
@ -1,4 +1,4 @@
|
||||
package daemon
|
||||
package agent
|
||||
|
||||
import (
|
||||
"github.com/openziti/zrok/sdk/golang/sdk"
|
@ -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)
|
Loading…
Reference in New Issue
Block a user