func NewDaemonServiceRouter(
	d Daemon,
	mux *mux.Router,
	clientCerts, clusterCerts func() []x509.Certificate,
	logger log.Logger,
) *DaemonServiceRouter {
	return &DaemonServiceRouter{
		ServiceRouter: &ServiceRouter{
			setupChan: func() <-chan struct{} {
				return d.SetupChan()
			},
			context: func() context.Context {
				return context.WithValue(context.Background(), DaemonKey, d)
			},
			validNonce: func(nonce string) bool {
				return d.Nonce() == nonce
			},
			mux:          mux,
			clientCerts:  clientCerts,
			clusterCerts: clusterCerts,
			logger:       logger,
		},
		d: d,
	}
}
NewDaemonServiceRouter creates a ServiceRouter with sane defaults
package api
import (
	"context"
	"crypto/x509"
	"net/http"
	"github.com/go-kit/kit/log/level"
	"github.com/go-kit/kit/log"
	"github.com/gorilla/mux"
	clusterconfig "github.com/spoke-d/thermionic/internal/cluster/config"
)
type DaemonServiceRouter struct {
	*ServiceRouter
	d Daemon
}