util

package
v0.0.0-...-db62745 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DockerHubHost = "index.docker.io/v1/"
View Source
const MaxHashLength = 10

Variables

This section is empty.

Functions

func CreateTLSHTTPClient

func CreateTLSHTTPClient(certPaths []CertPaths) (*http.Client, error)

func GenerateNatsURL

func GenerateNatsURL(natsPassword, natsIP string, natsPort int) string

func Hash

func Hash(s string) (string, error)

func NewLagerLogr

func NewLagerLogr(logger lager.Logger) logr.Logger

func ParseAppIndex

func ParseAppIndex(podName string) (int, error)

func ParseImageRegistryHost

func ParseImageRegistryHost(imageURL string) string

Types

type CertPaths

type CertPaths struct {
	Crt, Key, Ca string
}

type LagerLogr

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

LagerLogr is a logr (https://github.com/go-logr/logr) implementation over lager.Logger

func (LagerLogr) Enabled

func (l LagerLogr) Enabled(level int) bool

func (LagerLogr) Error

func (l LagerLogr) Error(err error, msg string, kvs ...interface{})

func (LagerLogr) Info

func (l LagerLogr) Info(level int, msg string, kvs ...interface{})

func (LagerLogr) Init

func (l LagerLogr) Init(info logr.RuntimeInfo)

func (LagerLogr) WithName

func (l LagerLogr) WithName(name string) logr.LogSink

func (LagerLogr) WithValues

func (l LagerLogr) WithValues(kvs ...interface{}) logr.LogSink

type RetryableJSONClient

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

func NewRetryableJSONClient

func NewRetryableJSONClient(httpClient *http.Client) *RetryableJSONClient

func NewRetryableJSONClientWithConfig

func NewRetryableJSONClientWithConfig(httpClient *http.Client, retries int, maxDelay time.Duration, logWriter io.Writer) *RetryableJSONClient

func (*RetryableJSONClient) Post

func (c *RetryableJSONClient) Post(ctx context.Context, url string, data interface{}) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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