eventlibrary

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Event Library

This installs is a simple file server from the test_images/event-library package. The local events dir is symlinked into the kodata dir.

Example local test (from the root of the project):

KO_DATA_PATH=./test/test_images/event-library/kodata \
  go run ./test/test_images/event-library

Then access the files path-ed exactly as they are rooted from resources/eventlibrary dir:

curl localhost:8080/events/three.ce

Results in the contents of ./events/three.ce.

Documentation

Overview

Example
package main

import (
	"os"

	"knative.dev/reconciler-test/pkg/manifest"
)

func main() {
	images := map[string]string{
		"ko://knative.dev/eventing/test/test_images/event-library": "gcr.io/knative-samples/helloworld-go",
	}
	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: v1
kind: Pod
metadata:
  name: foo
  namespace: bar
  labels:
    app: library-foo
spec:
  restartPolicy: "Never"
  containers:
    - name: library
      image: gcr.io/knative-samples/helloworld-go
      imagePullPolicy: "IfNotPresent"
---
apiVersion: v1
kind: Service
metadata:
  name: foo
  namespace: bar
spec:
  selector:
    app: library-foo
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsKReference

func AsKReference(name string) *duckv1.KReference

AsKReference returns a KReference for the svc the event library uses to be addressable.

func Install

func Install(name string) feature.StepFn

Install

func IsReady

func IsReady(name string) feature.StepFn

func PathFor

func PathFor(file string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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