utils

package
v0.0.0-...-db3a1d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const PublicSSHKeyName = "ssh_known_hosts"

Variables

View Source
var (
	SSHURLRegexp = regexp.MustCompile(`(?P<User>.+)@(?P<Host>[\w.]+)[/:].*`)
)

Functions

func EvaluatePublicKey

func EvaluatePublicKey(sshURL string) (string, error)

TODO: Need to find a better solution. The best way is use standard library.

func NewClient

func NewClient(cache cache.Cache, config *rest.Config, options client.Options) (client.Client, error)

func NewManager

func NewManager() (manager.Manager, error)

func SetupLogger

func SetupLogger()

SetupLogger setups global logger

func StreamLogs

func StreamLogs(
	k8sConfig *rest.Config, namespace string, podName string,
	containerName string, writer Writer, follow bool, logFlushSize int64,
) error

Stream logs from the pod to the writer object k8sConfig - kubernetes config namespace - namespace where pod is located podName - kubernetes pod name containerName - container name of the pod writer - logs will be streamed into this writer follow - specify if the logs should be streamed logFlushSize - size of the flushed logs per chunk

func TektonContainerName

func TektonContainerName(stepName string) string

Generate tekton container name base on the step name

func Unzip

func Unzip(src string, dest string) error

func ZipDir

func ZipDir(source, target string) error

Types

type Writer

type Writer interface {
	http.Flusher
	http.CloseNotifier
	io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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