validations

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDockerAllocatedMemory

func CheckDockerAllocatedMemory(ctx context.Context, dockerExecutable DockerExecutable)

func CheckMinimumDockerVersion

func CheckMinimumDockerVersion(ctx context.Context, dockerExecutable DockerExecutable) error

func ClusterName

func ClusterName(clusterName string) error

func ClusterNameLength

func ClusterNameLength(clusterName string) error

func FileExists

func FileExists(filename string) bool

func KubeConfigExists

func KubeConfigExists(dir, clusterName string, kubeConfigFileOverride string, kubeconfigPattern string) bool

func ValidateClusterNameArg

func ValidateClusterNameArg(args []string) (string, error)

Types

type DockerExecutable

type DockerExecutable interface {
	Version(ctx context.Context) (int, error)
	AllocatedMemory(ctx context.Context) (uint64, error)
}

type Runner

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

func NewRunner

func NewRunner() *Runner

func (*Runner) Register

func (r *Runner) Register(validations ...Validation)

func (*Runner) Run

func (r *Runner) Run() error

type Validation

type Validation func() *ValidationResult

type ValidationResult

type ValidationResult struct {
	Name        string
	Err         error
	Remediation string
}

func (*ValidationResult) LogPass

func (v *ValidationResult) LogPass()

func (*ValidationResult) Report

func (v *ValidationResult) Report()

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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