mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
5bb06f4e82
* Get certSANS from kubeadm config after initializing cluster (join master, update cert) * Fix incorrect cluster state saving, skip precheck && preProcess incorrectly save cluster state
48 lines
996 B
Go
48 lines
996 B
Go
/*
|
|
Copyright 2022.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package processor
|
|
|
|
type CheckError struct {
|
|
err error
|
|
}
|
|
|
|
func (e *CheckError) Error() string {
|
|
return e.err.Error()
|
|
}
|
|
|
|
func NewCheckError(err error) error {
|
|
if err != nil {
|
|
err = &CheckError{err: err}
|
|
}
|
|
return err
|
|
}
|
|
|
|
type PreProcessError struct {
|
|
err error
|
|
}
|
|
|
|
func (e *PreProcessError) Error() string {
|
|
return e.err.Error()
|
|
}
|
|
|
|
func NewPreProcessError(err error) error {
|
|
if err != nil {
|
|
err = &PreProcessError{err: err}
|
|
}
|
|
return err
|
|
}
|