reporter

package module
v0.0.0-...-c309347 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoDynamicCliSetError = errors.New("no dynamicCli set, use reporter.WithDynamicClient during initialization")
View Source
var NoGroupVersionResourceSetError = errors.New("no GroupVersionResource set, use reporter.WithGVRSchema during initialization")

Functions

This section is empty.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithDynamicClient

func WithDynamicClient(dynamicCli dynamic.Interface) Option

func WithGVRSchema

func WithGVRSchema(schema schema.GroupVersionResource) Option

type Reader

type Reader interface {
	List(ctx context.Context, namespace string, options metav1.ListOptions) ([]string, error)
	Get(ctx context.Context, name, namespace string, options metav1.GetOptions) (string, error)
}

type YamlReporter

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

func New

func New(opts ...Option) (YamlReporter, error)

New creates and validates YamlReporter struct

func (YamlReporter) Get

func (r YamlReporter) Get(ctx context.Context, name, namespace string, options metav1.GetOptions) (string, error)

func (YamlReporter) List

func (r YamlReporter) List(ctx context.Context, namespace string, options metav1.ListOptions) ([]string, error)

Jump to

Keyboard shortcuts

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