create the service (#3)

This commit is contained in:
Michael Quigley
2022-07-26 16:21:49 -04:00
parent 83b141ae00
commit 2d4299984e
6 changed files with 83 additions and 20 deletions

View File

@ -9,6 +9,7 @@ import (
"github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations"
"github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/identity"
"github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/metadata"
"github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/tunnel"
"github.com/pkg/errors"
)
@ -30,6 +31,7 @@ func Run(cfg *Config) error {
api.MetadataVersionHandler = metadata.VersionHandlerFunc(versionHandler)
api.IdentityCreateAccountHandler = identity.CreateAccountHandlerFunc(createAccountHandler)
api.IdentityEnableHandler = identity.EnableHandlerFunc(enableHandler)
api.TunnelTunnelHandler = tunnel.TunnelHandlerFunc(tunnelHandler)
server := rest_server_zrok.NewServer(api)
defer func() { _ = server.Shutdown() }()