...
1 package kclient
2
3 import "fmt"
4
5
6 type DeploymentNotFoundError struct {
7 Selector string
8 }
9
10 func (e *DeploymentNotFoundError) Error() string {
11 return fmt.Sprintf("deployment not found for the selector: %s", e.Selector)
12 }
13
14
15 type ServiceNotFoundError struct {
16 Selector string
17 }
18
19 func (e *ServiceNotFoundError) Error() string {
20 return fmt.Sprintf("service not found for the selector %q", e.Selector)
21 }
22
23 type NoConnectionError struct{}
24
25 func NewNoConnectionError() NoConnectionError {
26 return NoConnectionError{}
27 }
28
29 func (e NoConnectionError) Error() string {
30
31 return "unable to access the cluster"
32 }
33
View as plain text