Skip to content
Simplify building OAM runtime
Go Other
  1. Go 99.1%
  2. Other 0.9%
Branch: master
Clone or download
wonderflow support user defined status handler (#24)
* support user defined status handler

* if no modules, default phase should be progressing
Latest commit 202f289 Feb 5, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add CODEOWNERS Jan 16, 2020
code-gen-vendor/ add to project Jan 6, 2020
config add kubebuilder flag and auto generate yaml Feb 4, 2020
doc remove pre/post hooks Jan 15, 2020
examples add servicebinding trait definition Jan 29, 2020
hack add to project Jan 6, 2020
oambuilder add oambuilder Jan 16, 2020
pkg support new CRD and add a demo Feb 5, 2020
.gitignore initial open source commit Dec 14, 2019
LICENSE Initial commit Dec 13, 2019
Makefile pin controller-gen to 0.2.5 Jan 31, 2020 initial open source commit Dec 14, 2019
go.mod pin controller-gen to 0.2.5 Jan 31, 2020

OAM Runtime SDK

The OAM Runtime SDK Project is a collection of go libraries and utility tools for building OAM runtime. With the SDK, we want to streamline and simplify building OAM runtime by achieving:

  • Building new and converting to OAM API types easily.
  • Reducing duplicate coding work via generating code scallfold and importing go library.
  • Hiding low level details like k8s informer and providing high level abstraction to simplify user implementation.


The SDK has the following major concepts that simplifies writing OAM code:

  • Handler: A handler is an interface that must be user-implemented. The inputs and outputs are high level abstractions of events and actions.
  • Event: An event is an encapsulation of change that triggers user handler. It could be events of k8s or other platforms (e.g. cloud MQ).
  • Action: An action is an abstraction of declarative description of platform dependent operations. It separates concerns of high level user intention and low level platform details (e.g. client-go). In this way we have a modular system that provides reusable and pluggable actions.

The following diagram shows how they work together:


For more concepts in this SDK, please refer to

Getting started

There is an example implementation of OAM runtime using SDK in pkg/example/main.go. We recommend reading the code as a starting point.

We could run the code and deploy OAM app by running following commands:

# turn on go module
export GO111MODULE=on

# install oam crds
make install

# run example
go run pkg/example/main.go

# deploy OAM app
kubectl apply -f examples/app.yaml


oam-runtime contains many utilities to help you implement oam runtime easier:

  • finalizer

  • status check

  • spec equal check

You can’t perform that action at this time.