resetoffset

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Example
images := map[string]string{}

cfg := map[string]interface{}{
	"name":      "foo",
	"namespace": "bar",
	"version":   "v1alpha1",
}
WithOffsetTime("earliest")(cfg)
WithRef(&duckv1.KReference{
	APIVersion: "messaging.knative.dev/v1",
	Kind:       "Subscription",
	Namespace:  "bar",
	Name:       "baz",
})(cfg)

files, err := manifest.ExecuteYAML(yaml, images, cfg)
if err != nil {
	panic(err)
}

manifest.OutputYAML(os.Stdout, files)
Output:

apiVersion: kafka.eventing.knative.dev/v1alpha1
kind: ResetOffset
metadata:
  name: foo
  namespace: bar
spec:
  offset:
    time: earliest
  ref:
    apiVersion: messaging.knative.dev/v1
    kind: Subscription
    namespace: bar
    name: baz

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVR

func Install

func Install(name string, opts ...manifest.CfgFn) feature.StepFn

Install will create a ResetOffset resource, using the latest version, augmented with the config fn options.

func IsSucceeded

func IsSucceeded(name string, timings ...time.Duration) feature.StepFn

IsSucceeded tests to see if a ResetOffset becomes succeeded within the time given.

func WithOffsetTime

func WithOffsetTime(offsetTime string) manifest.CfgFn

WithOffsetTime adds the offsetTime config to a ResetOffset spec.

func WithRef

func WithRef(ref *duckv1.KReference) manifest.CfgFn

WithRef adds the ref config to a ResetOffset spec.

func WithVersion

func WithVersion(version string) manifest.CfgFn

WithVersion overrides the default API version

Types

This section is empty.

Jump to

Keyboard shortcuts

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