v1beta2

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KnPingSourcesClient

type KnPingSourcesClient interface {

	// GetPingSource fetches a Ping source by its name
	GetPingSource(ctx context.Context, name string) (*sourcesv1beta2.PingSource, error)

	// CreatePingSource creates a Ping source
	CreatePingSource(ctx context.Context, pingSource *sourcesv1beta2.PingSource) error

	// UpdatePingSource updates a Ping source
	UpdatePingSource(ctx context.Context, pingSource *sourcesv1beta2.PingSource) error

	// UpdatePingSourceWithRetry updates a Ping source and retries on conflict
	UpdatePingSourceWithRetry(ctx context.Context, name string, updateFunc PingSourceUpdateFunc, nrRetries int) error

	// DeletePingSource deletes a Ping source
	DeletePingSource(ctx context.Context, name string) error

	// ListPingSource lists all Ping sources
	// TODO: Support list configs like in service list
	ListPingSource(ctx context.Context) (*sourcesv1beta2.PingSourceList, error)

	// Get namespace for this source
	Namespace() string
}

Interface for interacting with a Ping source

type KnSourcesClient

type KnSourcesClient interface {
	// Get client for Ping sources
	PingSourcesClient() KnPingSourcesClient
}

KnSinkBindingClient to Eventing Sources. All methods are relative to the namespace specified during construction

func NewKnSourcesClient

func NewKnSourcesClient(client clientv1beta2.SourcesV1beta2Interface, namespace string) KnSourcesClient

NewKnSourcesClient for managing all eventing built-in sources

type MockKnPingSourceClient

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

func NewMockKnPingSourceClient

func NewMockKnPingSourceClient(t *testing.T, ns ...string) *MockKnPingSourceClient

NewMockKnPingSourceClient returns a new mock instance which you need to record for

func (*MockKnPingSourceClient) CreatePingSource

func (c *MockKnPingSourceClient) CreatePingSource(ctx context.Context, pingSource *sourcesv1beta2.PingSource) error

CreatePingSource performs a previously recorded action, failing if non has been registered

func (*MockKnPingSourceClient) DeletePingSource

func (c *MockKnPingSourceClient) DeletePingSource(ctx context.Context, name string) error

DeletePingSource performs a previously recorded action, failing if non has been registered

func (*MockKnPingSourceClient) GetPingSource

GetPingSource performs a previously recorded action, failing if non has been registered

func (*MockKnPingSourceClient) ListPingSource

ListPingSource performs a previously recorded action, failing if non has been registered

func (*MockKnPingSourceClient) Namespace

func (c *MockKnPingSourceClient) Namespace() string

Namespace of this client

func (*MockKnPingSourceClient) Recorder

Recorder returns the recorder for registering API calls

func (*MockKnPingSourceClient) UpdatePingSource

func (c *MockKnPingSourceClient) UpdatePingSource(ctx context.Context, pingSource *sourcesv1beta2.PingSource) error

UpdatePingSource performs a previously recorded action, failing if non has been registered

func (*MockKnPingSourceClient) UpdatePingSourceWithRetry added in v0.26.0

func (c *MockKnPingSourceClient) UpdatePingSourceWithRetry(ctx context.Context, name string, updateFunc PingSourceUpdateFunc, nrRetries int) error

type PingSourceBuilder

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

func NewPingSourceBuilder

func NewPingSourceBuilder(name string) *PingSourceBuilder

func NewPingSourceBuilderFromExisting

func NewPingSourceBuilderFromExisting(pingsource *sourcesv1beta2.PingSource) *PingSourceBuilder

func (*PingSourceBuilder) Build

func (*PingSourceBuilder) CloudEventOverrides

func (b *PingSourceBuilder) CloudEventOverrides(ceo map[string]string, toRemove []string) *PingSourceBuilder

CloudEventOverrides adds given Cloud Event override extensions map to source spec

func (*PingSourceBuilder) Data

func (*PingSourceBuilder) DataBase64 added in v0.25.0

func (b *PingSourceBuilder) DataBase64(data string) *PingSourceBuilder

func (*PingSourceBuilder) Schedule

func (b *PingSourceBuilder) Schedule(schedule string) *PingSourceBuilder

func (*PingSourceBuilder) Sink

type PingSourceUpdateFunc added in v0.26.0

type PingSourceUpdateFunc func(origSource *sourcesv1beta2.PingSource) (*sourcesv1beta2.PingSource, error)

type PingSourcesRecorder

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

recorder for service

func (*PingSourcesRecorder) CreatePingSource

func (sr *PingSourcesRecorder) CreatePingSource(pingSource interface{}, err error)

CreatePingSource records a call for CreatePingSource with the expected error

func (*PingSourcesRecorder) DeletePingSource

func (sr *PingSourcesRecorder) DeletePingSource(name interface{}, err error)

UpdatePingSource records a call for DeletePingSource with the expected error (nil if none)

func (*PingSourcesRecorder) GetPingSource

func (sr *PingSourcesRecorder) GetPingSource(name interface{}, pingSource *sourcesv1beta2.PingSource, err error)

GetPingSource records a call for GetPingSource with the expected object or error. Either pingsource or err should be nil

func (*PingSourcesRecorder) ListPingSource

func (sr *PingSourcesRecorder) ListPingSource(pingSourceList *sourcesv1beta2.PingSourceList, err error)

ListPingSource records a call for ListPingSource with the expected error (nil if none)

func (*PingSourcesRecorder) UpdatePingSource

func (sr *PingSourcesRecorder) UpdatePingSource(pingSource interface{}, err error)

UpdatePingSource records a call for UpdatePingSource with the expected error (nil if none)

func (*PingSourcesRecorder) Validate

func (sr *PingSourcesRecorder) Validate()

Validates validates whether every recorded action has been called

Jump to

Keyboard shortcuts

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