mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 05:49:26 +00:00
Move request handlers out of server package
The servers package, and router.go in particular, had become quite large. Address this by moving some things out to separate packages: * http request handlers all move to pkg/server/handlers. * node password bootstrap auth handler goes into pkg/nodepassword with the other nodepassword code. While we're at it, also be more consistent about calling variables that hold a config.Control struct or reference `control` instead of `config` or `server`. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
17feb8bed1
commit
2e4e7cf2c1
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/k3s-io/k3s/pkg/kubeadm"
|
||||
"github.com/k3s-io/k3s/pkg/proctitle"
|
||||
"github.com/k3s-io/k3s/pkg/server"
|
||||
"github.com/k3s-io/k3s/pkg/server/handlers"
|
||||
"github.com/k3s-io/k3s/pkg/util"
|
||||
"github.com/k3s-io/k3s/pkg/version"
|
||||
"github.com/pkg/errors"
|
||||
@@ -153,7 +154,7 @@ func Rotate(app *cli.Context) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b, err := json.Marshal(server.TokenRotateRequest{
|
||||
b, err := json.Marshal(handlers.TokenRotateRequest{
|
||||
NewToken: ptr.To(cmds.TokenConfig.NewToken),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user