func (w *Registration) UUID() string {
	return w.uuid
}
UUID of the current host
package service
import (
	"context"
	"errors"
	"sync"
)
type RegistrationWrapper interface {
	Ready() bool                        
	WaitRegistration()                  
	Credentials() (Credentials, error)  
	UUID() string                       
}
type Registration struct {
	credChan       chan (Credentials)
	readyChan      chan bool
	ready          bool
	uuid           string
	mutex          sync.Mutex
	curCredentials *Credentials
}
func NewRegistration(ctx context.Context, uuid string, cred chan Credentials) *Registration {
	r := &Registration{
		credChan:       cred,
		readyChan:      make(chan bool, 1),
		ready:          false,
		uuid:           uuid,
		mutex:          sync.Mutex{},
		curCredentials: nil,
	}
	go r.worker(ctx)
	return r
}
func (w *Registration) WaitRegistration() {
	if w.Ready() {
		return
	}
	<-w.readyChan
}
func (w *Registration) Ready() bool {
	w.mutex.Lock()
	ready := w.ready
	w.mutex.Unlock()
	return ready
}