Files
sealos/pkg/apply/processor/error.go
T
Jiahui 5bb06f4e82 bugfix: the failure to add master after updating the certificate (#2942)
* Get certSANS from kubeadm config after initializing cluster (join master, update cert)

* Fix incorrect cluster state saving, skip precheck && preProcess incorrectly save cluster state
2023-04-13 14:00:45 +08:00

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
}