fake

package
v0.0.0-...-9fe8468 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestClient

func NewTestClient(initObjs ...runtime.Object) client.Client

Types

type FakeEvent

type FakeEvent struct {
	Object      runtime.Object
	EventType   string
	Reason      string
	Message     string
	Annotations map[string]string
}

type FakeRecorder

type FakeRecorder struct {
	Events []FakeEvent
}

func NewTestRecorder

func NewTestRecorder() FakeRecorder

func (FakeRecorder) AnnotatedEventf

func (e FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{})

AnnotatedEventf is just like eventf, but with annotations attached

func (FakeRecorder) Event

func (e FakeRecorder) Event(object runtime.Object, eventtype, reason, message string)

func (FakeRecorder) Eventf

func (e FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})

Eventf is just like Event, but with Sprintf for the message field.

func (FakeRecorder) PastEventf

func (e FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{})

PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field.

Jump to

Keyboard shortcuts

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