Documentation ¶
Overview ¶
Example (Full) ¶
package main import ( "os" "knative.dev/reconciler-test/pkg/manifest" ) func main() { images := map[string]string{} cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", "channelTemplate": map[string]interface{}{ "apiVersion": "channelimpl/v1", "kind": "mychannel", "spec": map[string]string{ "thing1": "value1", "thing2": "value2", }, }, "delivery": map[string]interface{}{ "retry": "42", "backoffPolicy": "exponential", "backoffDelay": "2007-03-01T13:00:00Z/P1Y2M10DT2H30M", "deadLetterSink": map[string]interface{}{ "ref": map[string]string{ "kind": "deadkind", "name": "deadname", "apiVersion": "deadapi", }, "uri": "/extra/path", }, }, } files, err := manifest.ExecuteLocalYAML(images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: messaging.knative.dev/v1 kind: Channel metadata: name: foo namespace: bar spec: channelTemplate: apiVersion: channelimpl/v1 kind: mychannel spec: thing1: value1 thing2: value2 delivery: deadLetterSink: ref: kind: deadkind namespace: bar name: deadname apiVersion: deadapi uri: /extra/path retry: 42 backoffPolicy: exponential backoffDelay: "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
Example (Min) ¶
package main import ( "os" "knative.dev/reconciler-test/pkg/manifest" ) func main() { images := map[string]string{} cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", } files, err := manifest.ExecuteLocalYAML(images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: messaging.knative.dev/v1 kind: Channel metadata: name: foo namespace: bar spec:
Index ¶
- func Address(ctx context.Context, name string, timings ...time.Duration) (*apis.URL, error)
- func AsRef(name string) *duckv1.KReference
- func GVK() schema.GroupVersionKind
- func GVR() schema.GroupVersionResource
- func Install(name string, opts ...manifest.CfgFn) feature.StepFn
- func IsAddressable(name string, timing ...time.Duration) feature.StepFn
- func IsReady(name string, timing ...time.Duration) feature.StepFn
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsRef ¶
func AsRef(name string) *duckv1.KReference
AsRef returns a KRef for a Channel without namespace.
func GVK ¶
func GVK() schema.GroupVersionKind
func GVR ¶
func GVR() schema.GroupVersionResource
func IsAddressable ¶
IsAddressable tests to see if a Channel becomes addressable within the time given.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.