utils

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8sClient

func GetK8sClient() (client.Client, error)

func IsDeployReady added in v1.3.0

func IsDeployReady(ctx context.Context, c client.Client, name, namespace string) wait.ConditionFunc

IsPodReady check if the pod in question is running state

func IsPodReady added in v1.3.0

func IsPodReady(ctx context.Context, c client.Client, podName, namespace string) wait.ConditionFunc

IsPodReady check if the pod in question is running state

func IsPodRunning added in v1.3.0

func IsPodRunning(ctx context.Context, c client.Client, podName, namespace string) wait.ConditionFunc

IsPodRunning check if the pod in question is running state

func NewSpinner added in v1.2.4

func NewSpinner(text string) *pterm.SpinnerPrinter

NewSpinner ...

func WaitAPIServiceReady added in v1.3.0

func WaitAPIServiceReady(ctx context.Context, client client.Client) error

func WaitForDeploymentReady added in v1.3.0

func WaitForDeploymentReady(ctx context.Context, k8sClient client.Client, namespace string, name string, timeout time.Duration) error

func WaitForPodsReady added in v1.3.0

func WaitForPodsReady(ctx context.Context, k8sClient client.Client, namespace string, name string, timeout time.Duration, bylabel string) error

Types

type ErrorResponse added in v1.2.4

type ErrorResponse struct {
	StatusCode int
	Errors     string
}

type GithubClient added in v1.2.4

type GithubClient struct {
	// contains filtered or unexported fields
}

func NewGithubClient added in v1.2.4

func NewGithubClient(apiKey string, httpClient *http.Client) (*GithubClient, error)

func (*GithubClient) Do added in v1.2.4

func (c *GithubClient) Do(req *http.Request, v interface{}) (*ErrorResponse, error)

func (*GithubClient) DoRequest added in v1.2.4

func (c *GithubClient) DoRequest(method, path string, body, v interface{}) (*ErrorResponse, error)

func (*GithubClient) GetLatest added in v1.3.0

func (c *GithubClient) GetLatest() (string, error)

func (*GithubClient) GetTags added in v1.2.4

func (c *GithubClient) GetTags() ([]Tag, *ErrorResponse, error)

func (*GithubClient) NewRequest added in v1.2.4

func (c *GithubClient) NewRequest(method, path string, body interface{}) (*http.Request, error)

type Obj added in v1.2.4

type Obj struct {
	SHA   string `json:"sha,omitempty"`
	TType string `json:"type,omitempty"`
	URL   string `json:"url,omitempty"`
}

type Tag added in v1.2.4

type Tag struct {
	Ref    string `json:"ref,omitempty"`
	NodeID string `json:"node_id,omitempty"`
	URL    string `json:"url,omitempty"`
	Object Obj    `json:"object,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL