k8s

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

View Source
const (
	// ToolKubectl -
	ToolKubectl = iota
	// ToolKapp -
	ToolKapp
)

Variables

This section is empty.

Functions

func FixLabelValue

func FixLabelValue(value string) string

FixLabelValue -

func MakeK8sValue

func MakeK8sValue(k8s K8s, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error)

MakeK8sValue -

func NewStreamValue

func NewStreamValue(s Stream) starlark.Value

NewStreamValue -

Types

type CancelObjectStream

type CancelObjectStream struct{}

CancelObjectStream -

func (CancelObjectStream) Error

func (c CancelObjectStream) Error() string

type Config

type Config func(options *Configs) error

Config -

func WithKubeConfigContent

func WithKubeConfigContent(value string) Config

WithKubeConfigContent -

func WithProgressSubscription

func WithProgressSubscription(value ProgressSubscription) Config

WithProgressSubscription -

func WithTool

func WithTool(value Tool) Config

WithTool -

func WithVerbose

func WithVerbose(value int) Config

WithVerbose -

type Configs

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

Configs -

func (*Configs) AddFlags

func (v *Configs) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

func (*Configs) Merge

func (v *Configs) Merge() Config

Merge -

func (*Configs) Progress

func (v *Configs) Progress(progress int)

Progress -

func (*Configs) SetTool

func (v *Configs) SetTool(tool Tool)

SetTool -

func (*Configs) Tool

func (v *Configs) Tool() Tool

Tool -

type FakeK8s

type FakeK8s struct {
	ApplyStub func(ObjectStream, *Options) error

	ConfigContentStub func() *string

	CreateOrUpdateStub func(*Object, func(obj *Object) error, *Options) (*Object, error)

	DeleteStub func(ObjectStream, *Options) error

	DeleteByNameStub func(string, string, *Options) error

	DeleteObjectStub func(string, string, *Options) error

	ForConfigStub func(string) (K8s, error)

	ForSubChartStub func(string, string, *semver.Version, int) K8s

	GetStub func(string, string, *Options) (*Object, error)

	HostStub func() string

	InspectStub func() string

	IsNotExistStub func(error) bool

	ListStub func(string, *Options, *ListOptions) (*Object, error)

	NamespaceStub func(*Options) *string

	PatchStub func(string, string, types.PatchType, string, *Options) (*Object, error)

	ProgressStub func(int)

	RolloutStatusStub func(string, string, *Options) error

	SetToolStub func(Tool)

	ToolStub func() Tool

	WaitStub func(string, string, string, *Options) error

	WatchStub func(string, string, *Options) ObjectStream

	WithContextStub func(context.Context) K8s
	// contains filtered or unexported fields
}

func (*FakeK8s) Apply

func (fake *FakeK8s) Apply(arg1 ObjectStream, arg2 *Options) error

func (*FakeK8s) ApplyArgsForCall

func (fake *FakeK8s) ApplyArgsForCall(i int) (ObjectStream, *Options)

func (*FakeK8s) ApplyCallCount

func (fake *FakeK8s) ApplyCallCount() int

func (*FakeK8s) ApplyCalls

func (fake *FakeK8s) ApplyCalls(stub func(ObjectStream, *Options) error)

func (*FakeK8s) ApplyReturns

func (fake *FakeK8s) ApplyReturns(result1 error)

func (*FakeK8s) ApplyReturnsOnCall

func (fake *FakeK8s) ApplyReturnsOnCall(i int, result1 error)

func (*FakeK8s) ConfigContent

func (fake *FakeK8s) ConfigContent() *string

func (*FakeK8s) ConfigContentCallCount

func (fake *FakeK8s) ConfigContentCallCount() int

func (*FakeK8s) ConfigContentCalls

func (fake *FakeK8s) ConfigContentCalls(stub func() *string)

func (*FakeK8s) ConfigContentReturns

func (fake *FakeK8s) ConfigContentReturns(result1 *string)

func (*FakeK8s) ConfigContentReturnsOnCall

func (fake *FakeK8s) ConfigContentReturnsOnCall(i int, result1 *string)

func (*FakeK8s) CreateOrUpdate

func (fake *FakeK8s) CreateOrUpdate(arg1 *Object, arg2 func(obj *Object) error, arg3 *Options) (*Object, error)

func (*FakeK8s) CreateOrUpdateArgsForCall

func (fake *FakeK8s) CreateOrUpdateArgsForCall(i int) (*Object, func(obj *Object) error, *Options)

func (*FakeK8s) CreateOrUpdateCallCount

func (fake *FakeK8s) CreateOrUpdateCallCount() int

func (*FakeK8s) CreateOrUpdateCalls

func (fake *FakeK8s) CreateOrUpdateCalls(stub func(*Object, func(obj *Object) error, *Options) (*Object, error))

func (*FakeK8s) CreateOrUpdateReturns

func (fake *FakeK8s) CreateOrUpdateReturns(result1 *Object, result2 error)

func (*FakeK8s) CreateOrUpdateReturnsOnCall

func (fake *FakeK8s) CreateOrUpdateReturnsOnCall(i int, result1 *Object, result2 error)

func (*FakeK8s) Delete

func (fake *FakeK8s) Delete(arg1 ObjectStream, arg2 *Options) error

func (*FakeK8s) DeleteArgsForCall

func (fake *FakeK8s) DeleteArgsForCall(i int) (ObjectStream, *Options)

func (*FakeK8s) DeleteByName

func (fake *FakeK8s) DeleteByName(arg1 string, arg2 string, arg3 *Options) error

func (*FakeK8s) DeleteByNameArgsForCall

func (fake *FakeK8s) DeleteByNameArgsForCall(i int) (string, string, *Options)

func (*FakeK8s) DeleteByNameCallCount

func (fake *FakeK8s) DeleteByNameCallCount() int

func (*FakeK8s) DeleteByNameCalls

func (fake *FakeK8s) DeleteByNameCalls(stub func(string, string, *Options) error)

func (*FakeK8s) DeleteByNameReturns

func (fake *FakeK8s) DeleteByNameReturns(result1 error)

func (*FakeK8s) DeleteByNameReturnsOnCall

func (fake *FakeK8s) DeleteByNameReturnsOnCall(i int, result1 error)

func (*FakeK8s) DeleteCallCount

func (fake *FakeK8s) DeleteCallCount() int

func (*FakeK8s) DeleteCalls

func (fake *FakeK8s) DeleteCalls(stub func(ObjectStream, *Options) error)

func (*FakeK8s) DeleteObject

func (fake *FakeK8s) DeleteObject(arg1 string, arg2 string, arg3 *Options) error

func (*FakeK8s) DeleteObjectArgsForCall

func (fake *FakeK8s) DeleteObjectArgsForCall(i int) (string, string, *Options)

func (*FakeK8s) DeleteObjectCallCount

func (fake *FakeK8s) DeleteObjectCallCount() int

func (*FakeK8s) DeleteObjectCalls

func (fake *FakeK8s) DeleteObjectCalls(stub func(string, string, *Options) error)

func (*FakeK8s) DeleteObjectReturns

func (fake *FakeK8s) DeleteObjectReturns(result1 error)

func (*FakeK8s) DeleteObjectReturnsOnCall

func (fake *FakeK8s) DeleteObjectReturnsOnCall(i int, result1 error)

func (*FakeK8s) DeleteReturns

func (fake *FakeK8s) DeleteReturns(result1 error)

func (*FakeK8s) DeleteReturnsOnCall

func (fake *FakeK8s) DeleteReturnsOnCall(i int, result1 error)

func (*FakeK8s) ForConfig

func (fake *FakeK8s) ForConfig(arg1 string) (K8s, error)

func (*FakeK8s) ForConfigArgsForCall

func (fake *FakeK8s) ForConfigArgsForCall(i int) string

func (*FakeK8s) ForConfigCallCount

func (fake *FakeK8s) ForConfigCallCount() int

func (*FakeK8s) ForConfigCalls

func (fake *FakeK8s) ForConfigCalls(stub func(string) (K8s, error))

func (*FakeK8s) ForConfigReturns

func (fake *FakeK8s) ForConfigReturns(result1 K8s, result2 error)

func (*FakeK8s) ForConfigReturnsOnCall

func (fake *FakeK8s) ForConfigReturnsOnCall(i int, result1 K8s, result2 error)

func (*FakeK8s) ForSubChart

func (fake *FakeK8s) ForSubChart(arg1 string, arg2 string, arg3 *semver.Version, arg4 int) K8s

func (*FakeK8s) ForSubChartArgsForCall

func (fake *FakeK8s) ForSubChartArgsForCall(i int) (string, string, *semver.Version, int)

func (*FakeK8s) ForSubChartCallCount

func (fake *FakeK8s) ForSubChartCallCount() int

func (*FakeK8s) ForSubChartCalls

func (fake *FakeK8s) ForSubChartCalls(stub func(string, string, *semver.Version, int) K8s)

func (*FakeK8s) ForSubChartReturns

func (fake *FakeK8s) ForSubChartReturns(result1 K8s)

func (*FakeK8s) ForSubChartReturnsOnCall

func (fake *FakeK8s) ForSubChartReturnsOnCall(i int, result1 K8s)

func (*FakeK8s) Get

func (fake *FakeK8s) Get(arg1 string, arg2 string, arg3 *Options) (*Object, error)

func (*FakeK8s) GetArgsForCall

func (fake *FakeK8s) GetArgsForCall(i int) (string, string, *Options)

func (*FakeK8s) GetCallCount

func (fake *FakeK8s) GetCallCount() int

func (*FakeK8s) GetCalls

func (fake *FakeK8s) GetCalls(stub func(string, string, *Options) (*Object, error))

func (*FakeK8s) GetReturns

func (fake *FakeK8s) GetReturns(result1 *Object, result2 error)

func (*FakeK8s) GetReturnsOnCall

func (fake *FakeK8s) GetReturnsOnCall(i int, result1 *Object, result2 error)

func (*FakeK8s) Host

func (fake *FakeK8s) Host() string

func (*FakeK8s) HostCallCount

func (fake *FakeK8s) HostCallCount() int

func (*FakeK8s) HostCalls

func (fake *FakeK8s) HostCalls(stub func() string)

func (*FakeK8s) HostReturns

func (fake *FakeK8s) HostReturns(result1 string)

func (*FakeK8s) HostReturnsOnCall

func (fake *FakeK8s) HostReturnsOnCall(i int, result1 string)

func (*FakeK8s) Inspect

func (fake *FakeK8s) Inspect() string

func (*FakeK8s) InspectCallCount

func (fake *FakeK8s) InspectCallCount() int

func (*FakeK8s) InspectCalls

func (fake *FakeK8s) InspectCalls(stub func() string)

func (*FakeK8s) InspectReturns

func (fake *FakeK8s) InspectReturns(result1 string)

func (*FakeK8s) InspectReturnsOnCall

func (fake *FakeK8s) InspectReturnsOnCall(i int, result1 string)

func (*FakeK8s) Invocations

func (fake *FakeK8s) Invocations() map[string][][]interface{}

func (*FakeK8s) IsNotExist

func (fake *FakeK8s) IsNotExist(arg1 error) bool

func (*FakeK8s) IsNotExistArgsForCall

func (fake *FakeK8s) IsNotExistArgsForCall(i int) error

func (*FakeK8s) IsNotExistCallCount

func (fake *FakeK8s) IsNotExistCallCount() int

func (*FakeK8s) IsNotExistCalls

func (fake *FakeK8s) IsNotExistCalls(stub func(error) bool)

func (*FakeK8s) IsNotExistReturns

func (fake *FakeK8s) IsNotExistReturns(result1 bool)

func (*FakeK8s) IsNotExistReturnsOnCall

func (fake *FakeK8s) IsNotExistReturnsOnCall(i int, result1 bool)

func (*FakeK8s) List

func (fake *FakeK8s) List(arg1 string, arg2 *Options, arg3 *ListOptions) (*Object, error)

func (*FakeK8s) ListArgsForCall

func (fake *FakeK8s) ListArgsForCall(i int) (string, *Options, *ListOptions)

func (*FakeK8s) ListCallCount

func (fake *FakeK8s) ListCallCount() int

func (*FakeK8s) ListCalls

func (fake *FakeK8s) ListCalls(stub func(string, *Options, *ListOptions) (*Object, error))

func (*FakeK8s) ListReturns

func (fake *FakeK8s) ListReturns(result1 *Object, result2 error)

func (*FakeK8s) ListReturnsOnCall

func (fake *FakeK8s) ListReturnsOnCall(i int, result1 *Object, result2 error)

func (*FakeK8s) Namespace

func (fake *FakeK8s) Namespace(arg1 *Options) *string

func (*FakeK8s) NamespaceArgsForCall

func (fake *FakeK8s) NamespaceArgsForCall(i int) *Options

func (*FakeK8s) NamespaceCallCount

func (fake *FakeK8s) NamespaceCallCount() int

func (*FakeK8s) NamespaceCalls

func (fake *FakeK8s) NamespaceCalls(stub func(*Options) *string)

func (*FakeK8s) NamespaceReturns

func (fake *FakeK8s) NamespaceReturns(result1 *string)

func (*FakeK8s) NamespaceReturnsOnCall

func (fake *FakeK8s) NamespaceReturnsOnCall(i int, result1 *string)

func (*FakeK8s) Patch

func (fake *FakeK8s) Patch(arg1 string, arg2 string, arg3 types.PatchType, arg4 string, arg5 *Options) (*Object, error)

func (*FakeK8s) PatchArgsForCall

func (fake *FakeK8s) PatchArgsForCall(i int) (string, string, types.PatchType, string, *Options)

func (*FakeK8s) PatchCallCount

func (fake *FakeK8s) PatchCallCount() int

func (*FakeK8s) PatchCalls

func (fake *FakeK8s) PatchCalls(stub func(string, string, types.PatchType, string, *Options) (*Object, error))

func (*FakeK8s) PatchReturns

func (fake *FakeK8s) PatchReturns(result1 *Object, result2 error)

func (*FakeK8s) PatchReturnsOnCall

func (fake *FakeK8s) PatchReturnsOnCall(i int, result1 *Object, result2 error)

func (*FakeK8s) Progress

func (fake *FakeK8s) Progress(arg1 int)

func (*FakeK8s) ProgressArgsForCall

func (fake *FakeK8s) ProgressArgsForCall(i int) int

func (*FakeK8s) ProgressCallCount

func (fake *FakeK8s) ProgressCallCount() int

func (*FakeK8s) ProgressCalls

func (fake *FakeK8s) ProgressCalls(stub func(int))

func (*FakeK8s) RolloutStatus

func (fake *FakeK8s) RolloutStatus(arg1 string, arg2 string, arg3 *Options) error

func (*FakeK8s) RolloutStatusArgsForCall

func (fake *FakeK8s) RolloutStatusArgsForCall(i int) (string, string, *Options)

func (*FakeK8s) RolloutStatusCallCount

func (fake *FakeK8s) RolloutStatusCallCount() int

func (*FakeK8s) RolloutStatusCalls

func (fake *FakeK8s) RolloutStatusCalls(stub func(string, string, *Options) error)

func (*FakeK8s) RolloutStatusReturns

func (fake *FakeK8s) RolloutStatusReturns(result1 error)

func (*FakeK8s) RolloutStatusReturnsOnCall

func (fake *FakeK8s) RolloutStatusReturnsOnCall(i int, result1 error)

func (*FakeK8s) SetTool

func (fake *FakeK8s) SetTool(arg1 Tool)

func (*FakeK8s) SetToolArgsForCall

func (fake *FakeK8s) SetToolArgsForCall(i int) Tool

func (*FakeK8s) SetToolCallCount

func (fake *FakeK8s) SetToolCallCount() int

func (*FakeK8s) SetToolCalls

func (fake *FakeK8s) SetToolCalls(stub func(Tool))

func (*FakeK8s) Tool

func (fake *FakeK8s) Tool() Tool

func (*FakeK8s) ToolCallCount

func (fake *FakeK8s) ToolCallCount() int

func (*FakeK8s) ToolCalls

func (fake *FakeK8s) ToolCalls(stub func() Tool)

func (*FakeK8s) ToolReturns

func (fake *FakeK8s) ToolReturns(result1 Tool)

func (*FakeK8s) ToolReturnsOnCall

func (fake *FakeK8s) ToolReturnsOnCall(i int, result1 Tool)

func (*FakeK8s) Wait

func (fake *FakeK8s) Wait(arg1 string, arg2 string, arg3 string, arg4 *Options) error

func (*FakeK8s) WaitArgsForCall

func (fake *FakeK8s) WaitArgsForCall(i int) (string, string, string, *Options)

func (*FakeK8s) WaitCallCount

func (fake *FakeK8s) WaitCallCount() int

func (*FakeK8s) WaitCalls

func (fake *FakeK8s) WaitCalls(stub func(string, string, string, *Options) error)

func (*FakeK8s) WaitReturns

func (fake *FakeK8s) WaitReturns(result1 error)

func (*FakeK8s) WaitReturnsOnCall

func (fake *FakeK8s) WaitReturnsOnCall(i int, result1 error)

func (*FakeK8s) Watch

func (fake *FakeK8s) Watch(arg1 string, arg2 string, arg3 *Options) ObjectStream

func (*FakeK8s) WatchArgsForCall

func (fake *FakeK8s) WatchArgsForCall(i int) (string, string, *Options)

func (*FakeK8s) WatchCallCount

func (fake *FakeK8s) WatchCallCount() int

func (*FakeK8s) WatchCalls

func (fake *FakeK8s) WatchCalls(stub func(string, string, *Options) ObjectStream)

func (*FakeK8s) WatchReturns

func (fake *FakeK8s) WatchReturns(result1 ObjectStream)

func (*FakeK8s) WatchReturnsOnCall

func (fake *FakeK8s) WatchReturnsOnCall(i int, result1 ObjectStream)

func (*FakeK8s) WithContext

func (fake *FakeK8s) WithContext(arg1 context.Context) K8s

func (*FakeK8s) WithContextArgsForCall

func (fake *FakeK8s) WithContextArgsForCall(i int) context.Context

func (*FakeK8s) WithContextCallCount

func (fake *FakeK8s) WithContextCallCount() int

func (*FakeK8s) WithContextCalls

func (fake *FakeK8s) WithContextCalls(stub func(context.Context) K8s)

func (*FakeK8s) WithContextReturns

func (fake *FakeK8s) WithContextReturns(result1 K8s)

func (*FakeK8s) WithContextReturnsOnCall

func (fake *FakeK8s) WithContextReturnsOnCall(i int, result1 K8s)

type K8s

type K8s interface {
	K8sReader
	ForSubChart(namespace string, app string, version *semver.Version, children int) K8s
	Inspect() string
	Watch(kind string, name string, options *Options) ObjectStream
	RolloutStatus(kind string, name string, options *Options) error
	Wait(kind string, name string, condition string, options *Options) error
	DeleteObject(kind string, name string, options *Options) error
	Apply(output ObjectStream, options *Options) error
	Delete(output ObjectStream, options *Options) error
	Patch(kind string, name string, pt types.PatchType, patch string, options *Options) (*Object, error)
	CreateOrUpdate(obj *Object, mutate func(obj *Object) error, options *Options) (*Object, error)
	DeleteByName(kind string, name string, options *Options) error
	ConfigContent() *string
	ForConfig(config string) (K8s, error)
	WithContext(ctx context.Context) K8s
	Progress(progress int)
	Tool() Tool
	SetTool(tool Tool)
	Namespace(options *Options) *string
}

K8s kubernetes API

func NewK8s

func NewK8s(configs ...Config) (K8s, error)

NewK8s create new instance to interact with kubernetes

type K8sInMemory

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

K8sInMemory in memory implementation of K8s

func NewK8sInMemory

func NewK8sInMemory(namespace string, objects ...Object) *K8sInMemory

NewK8sInMemory creates a new K8sInMemory instance

func NewK8sInMemoryEmpty

func NewK8sInMemoryEmpty() *K8sInMemory

NewK8sInMemoryEmpty creates a new K8sInMemory instance

func (K8sInMemory) Apply

func (k K8sInMemory) Apply(output ObjectStream, options *Options) error

Apply -

func (K8sInMemory) ConfigContent

func (k K8sInMemory) ConfigContent() *string

ConfigContent -

func (K8sInMemory) CreateOrUpdate

func (k K8sInMemory) CreateOrUpdate(obj *Object, mutate func(obj *Object) error, options *Options) (*Object, error)

func (K8sInMemory) Delete

func (k K8sInMemory) Delete(output ObjectStream, options *Options) error

Delete -

func (K8sInMemory) DeleteByName

func (k K8sInMemory) DeleteByName(kind string, name string, options *Options) error

func (K8sInMemory) DeleteObject

func (k K8sInMemory) DeleteObject(kind string, name string, options *Options) error

DeleteObject -

func (K8sInMemory) ForConfig

func (k K8sInMemory) ForConfig(config string) (K8s, error)

ForConfig -

func (K8sInMemory) ForSubChart

func (k K8sInMemory) ForSubChart(namespace string, app string, version *semver.Version, children int) K8s

ForSubChart -

func (K8sInMemory) Get

func (k K8sInMemory) Get(kind string, name string, options *Options) (*Object, error)

Get -

func (K8sInMemory) GetObject

func (k K8sInMemory) GetObject(kind string, name string, options *Options) (*Object, error)

GetObject -

func (K8sInMemory) Host

func (k K8sInMemory) Host() string

Host -

func (K8sInMemory) Inspect

func (k K8sInMemory) Inspect() string

Inspect -

func (K8sInMemory) IsNotExist

func (k K8sInMemory) IsNotExist(err error) bool

IsNotExist -

func (K8sInMemory) List

func (k K8sInMemory) List(kind string, options *Options, listOptions *ListOptions) (*Object, error)

List -

func (K8sInMemory) Namespace

func (k K8sInMemory) Namespace(options *Options) *string

func (K8sInMemory) Patch

func (k K8sInMemory) Patch(kind string, name string, pt types.PatchType, patchJSON string, options *Options) (*Object, error)

Patch -

func (K8sInMemory) Progress

func (k K8sInMemory) Progress(progress int)

Progress -

func (K8sInMemory) RolloutStatus

func (k K8sInMemory) RolloutStatus(kind string, name string, options *Options) error

RolloutStatus -

func (K8sInMemory) SetTool

func (k K8sInMemory) SetTool(tool Tool)

SetTool -

func (K8sInMemory) Tool

func (k K8sInMemory) Tool() Tool

Tool -

func (K8sInMemory) Wait

func (k K8sInMemory) Wait(kind string, name string, condition string, options *Options) error

Wait -

func (K8sInMemory) Watch

func (k K8sInMemory) Watch(kind string, name string, options *Options) ObjectStream

Watch -

func (K8sInMemory) WithContext

func (k K8sInMemory) WithContext(ctx context.Context) K8s

WithContext -

type K8sReader

type K8sReader interface {
	Host() string
	Get(kind string, name string, options *Options) (*Object, error)
	List(kind string, options *Options, listOptions *ListOptions) (*Object, error)
	IsNotExist(err error) bool
}

K8sReader kubernetes reader API

type K8sValue

type K8sValue interface {
	starlark.Value
	K8s
}

K8sValue -

func NewK8sValue

func NewK8sValue(k K8s) K8sValue

NewK8sValue create new instance to interact with kubernetes

type ListOptions

type ListOptions struct {
	LabelSelector labels.Selector
	AllNamespaces bool
}

ListOptions -

type MetaData

type MetaData struct {
	Namespace   string
	Name        string
	Labels      map[string]string
	Annotations map[string]string
	Additional  map[string]json.RawMessage
}

MetaData -

func (MetaData) MarshalJSON

func (m MetaData) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*MetaData) UnmarshalJSON

func (m *MetaData) UnmarshalJSON(b []byte) error

UnmarshalJSON -

type Object

type Object struct {
	MetaData   MetaData                   `json:"metadata,omitempty"`
	APIVersion string                     `json:"apiVersion,omitempty"`
	Kind       string                     `json:"kind,omitempty"`
	Additional map[string]json.RawMessage `json:",inline"`
}

Object -

func (Object) MarshalJSON

func (o Object) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Object) UnmarshalJSON

func (o *Object) UnmarshalJSON(b []byte) error

UnmarshalJSON -

type ObjectConsumer

type ObjectConsumer = func(obj *Object) error

ObjectConsumer -

type ObjectStream

type ObjectStream func(w ObjectConsumer) error

ObjectStream -

func Decode

func Decode(in Stream) ObjectStream

Decode -

func ObjectErrorStream

func ObjectErrorStream(err error) ObjectStream

ObjectErrorStream -

func (ObjectStream) Encode

func (o ObjectStream) Encode() Stream

Encode -

func (ObjectStream) Filter

func (o ObjectStream) Filter(filter func(obj *Object) bool) ObjectStream

Filter -

func (ObjectStream) GroupBy

func (o ObjectStream) GroupBy(group func(o *Object) string) func(key string) ObjectStream

GroupBy -

func (ObjectStream) Map

func (o ObjectStream) Map(f func(obj *Object) *Object) ObjectStream

Map -

func (ObjectStream) Sort

func (o ObjectStream) Sort(f func(o1 *Object, o2 *Object) int, reverse bool) ObjectStream

Sort -

type Options

type Options struct {
	ClusterScoped  bool
	Namespace      string
	Timeout        time.Duration
	IgnoreNotFound bool
	Quiet          bool
	Tool           Tool
}

Options common options for calls to k8s

func (*Options) UnpackArgs

func (k *Options) UnpackArgs(fnname string, args starlark.Tuple, kwargs []starlark.Tuple, pairs ...interface{}) error

UnpackArgs -

type ProgressSubscription

type ProgressSubscription = func(progress int)

ProgressSubscription -

type Stream

type Stream = func(io.Writer) error

Stream -

func ErrorStream

func ErrorStream(err error) Stream

ErrorStream -

func ToStream

func ToStream(v starlark.Value, err error) Stream

ToStream -

func YamlConcat

func YamlConcat(streams ...Stream) Stream

YamlConcat -

type Tool

type Tool int

Tool -

func (*Tool) Set

func (t *Tool) Set(val string) error

Set -

func (Tool) String

func (t Tool) String() string

func (*Tool) Type

func (t *Tool) Type() string

Type -

Jump to

Keyboard shortcuts

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