feat: adding unit testing and example

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
This commit is contained in:
AlexsJones
2023-04-02 21:17:05 +01:00
parent b6436378e1
commit 35b838bfaf
5 changed files with 55 additions and 4 deletions

View File

@@ -6,11 +6,11 @@ import (
)
type Client struct {
client *kubernetes.Clientset
Client kubernetes.Interface
}
func (c *Client) GetClient() *kubernetes.Clientset {
return c.client
func (c *Client) GetClient() kubernetes.Interface {
return c.Client
}
func NewClient(kubecontext string, kubeconfig string) (*Client, error) {
@@ -31,6 +31,6 @@ func NewClient(kubecontext string, kubeconfig string) (*Client, error) {
}
return &Client{
client: clientSet,
Client: clientSet,
}, nil
}