mirror of
https://github.com/openziti/zrok.git
synced 2025-06-24 19:51:32 +02:00
need to store agent enrollment details (#967)
This commit is contained in:
parent
14b40b3875
commit
8b2910adcf
@ -30,6 +30,7 @@ type Root interface {
|
||||
|
||||
AgentSocket() (string, error)
|
||||
AgentRegistry() (string, error)
|
||||
AgentEnrollment() (string, error)
|
||||
}
|
||||
|
||||
type Environment struct {
|
||||
|
@ -201,6 +201,10 @@ func (r *Root) AgentRegistry() (string, error) {
|
||||
return "", errors.Errorf("this environment version does not support the zrok Agent; please 'zrok update' this environment")
|
||||
}
|
||||
|
||||
func (r *Root) AgentEnrollment() (string, error) {
|
||||
return "", errors.Errorf("this environment version does not support the zrok Agent; please 'zrok update' this environment")
|
||||
}
|
||||
|
||||
func (r *Root) Obliterate() error {
|
||||
zrd, err := rootDir()
|
||||
if err != nil {
|
||||
|
@ -200,6 +200,10 @@ func (r *Root) AgentRegistry() (string, error) {
|
||||
return agentRegistry()
|
||||
}
|
||||
|
||||
func (r *Root) AgentEnrollment() (string, error) {
|
||||
return agentEnrollment()
|
||||
}
|
||||
|
||||
func (r *Root) Obliterate() error {
|
||||
zrd, err := rootDir()
|
||||
if err != nil {
|
||||
|
@ -69,3 +69,11 @@ func agentRegistry() (string, error) {
|
||||
}
|
||||
return filepath.Join(zrd, "agent-registry.json"), nil
|
||||
}
|
||||
|
||||
func agentEnrollment() (string, error) {
|
||||
zrd, err := rootDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(zrd, "agent-enrollment.json"), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user