{"id":14156515,"url":"https://github.com/oam-dev/oam-go-sdk","last_synced_at":"2025-04-13T00:32:23.692Z","repository":{"id":53734172,"uuid":"227899935","full_name":"oam-dev/oam-go-sdk","owner":"oam-dev","description":"Simplify building OAM runtime","archived":false,"fork":false,"pushed_at":"2021-03-17T08:29:03.000Z","size":674,"stargazers_count":85,"open_issues_count":0,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-26T19:04:21.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/oam-dev/spec","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oam-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-12-13T18:32:31.000Z","updated_at":"2024-04-23T08:58:02.000Z","dependencies_parsed_at":"2022-09-26T20:01:51.584Z","dependency_job_id":null,"html_url":"https://github.com/oam-dev/oam-go-sdk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oam-dev%2Foam-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oam-dev%2Foam-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oam-dev%2Foam-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oam-dev%2Foam-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oam-dev","download_url":"https://codeload.github.com/oam-dev/oam-go-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650562,"owners_count":21139670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-17T08:05:32.741Z","updated_at":"2025-04-13T00:32:18.994Z","avatar_url":"https://github.com/oam-dev.png","language":"Go","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# OAM Runtime SDK\n\n**NOTE: This SDK only support v0.1.x release of OAM specification (v1alpha1). For v0.2.x release (v1alpha2) please check [KubeVela](https://github.com/oam-dev/kubevela) and its API lib repo [kubevela-core-api](https://github.com/oam-dev/kubevela-core-api) as dependency.**\n\nThe 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:\n\n- Building new and converting to OAM API types easily.\n- Reducing duplicate coding work via generating code scallfold and importing go library.\n- Hiding low level details like k8s informer and providing high level abstraction to simplify user implementation.\n\n\n## Concepts\n\nThe SDK has the following major concepts that simplifies writing OAM code:\n\n- **Handler**: A handler is an interface that must be user-implemented. \n               The inputs and outputs are high level abstractions of events and actions.\n- **Event**: An event is an encapsulation of change that triggers user handler.\n             It could be events of k8s or other platforms (e.g. cloud MQ).\n- **Action**: An action is an abstraction of declarative description of platform dependent operations.\n              It separates concerns of high level user intention and low level platform details (e.g. client-go).\n\t\t\t  In this way we have a modular system that provides reusable and pluggable actions.\n\nThe following diagram shows how they work together:\n\n![missing](./doc/img/handler-diagram.png)\n\nFor more concepts in this SDK, please refer to [concepts.md](./doc/concepts.md).\n\n## Getting started\n\nThere is an example implementation of OAM runtime using SDK in _pkg/example/framework/main.go_. We recommend reading the code as a starting point.\n\nWe could run the code and deploy OAM app by running following commands:\n\n\n```shell\n# turn on go module\nexport GO111MODULE=on\n\n# install oam crds\nmake install\n\n# run example\ngo run pkg/examples/framework/main.go\n\n# deploy OAM component\nkubectl apply -f examples/componentschematics.yaml\n\n# deploy OAM app\nkubectl apply -f examples/app.yaml\n```\n\nThis example will create a deployment as `Server` workload.\n\nThere is another example which will show you how to build more extensions. Read the [doc](pkg/examples/extendworkload/README.md) for more details.\n\n## Misc.\n\noam-runtime contains many utilities to help you implement oam runtime easier:\n\n* finalizer\n\n* status check\n\n* spec equal check\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foam-dev%2Foam-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foam-dev%2Foam-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foam-dev%2Foam-go-sdk/lists"}