{"id":22332737,"url":"https://github.com/xgfone/go-ovs","last_synced_at":"2025-03-26T07:22:13.880Z","repository":{"id":57545007,"uuid":"297650434","full_name":"xgfone/go-ovs","owner":"xgfone","description":"A simple OVS flow executor.","archived":false,"fork":false,"pushed_at":"2023-10-23T01:42:10.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T08:43:48.815Z","etag":null,"topics":["openvswitch","ovs","ovs-ofctl","ovs-vsctl"],"latest_commit_sha":null,"homepage":"","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/xgfone.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-22T13:02:16.000Z","updated_at":"2024-08-26T03:02:20.000Z","dependencies_parsed_at":"2022-08-27T05:21:36.870Z","dependency_job_id":"604dfccc-4e0c-47ff-b504-7ce92e9b5f22","html_url":"https://github.com/xgfone/go-ovs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfone%2Fgo-ovs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfone%2Fgo-ovs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfone%2Fgo-ovs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfone%2Fgo-ovs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xgfone","download_url":"https://codeload.github.com/xgfone/go-ovs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245606094,"owners_count":20643105,"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":["openvswitch","ovs","ovs-ofctl","ovs-vsctl"],"created_at":"2024-12-04T04:19:32.362Z","updated_at":"2025-03-26T07:22:13.856Z","avatar_url":"https://github.com/xgfone.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OVS [![Build Status](https://api.travis-ci.com/xgfone/go-ovs.svg?branch=master)](https://travis-ci.com/github/xgfone/go-ovs) [![GoDoc](https://pkg.go.dev/badge/github.com/xgfone/go-ovs)](https://pkg.go.dev/github.com/xgfone/go-ovs) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://raw.githubusercontent.com/xgfone/go-ovs/master/LICENSE)\n\nA simple OVS flow executor supporting `Go1.18+`.\n\n\n## Example\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/xgfone/go-exec\"\n\t\"github.com/xgfone/go-ovs\"\n)\n\nfunc main() {\n\tinitBridge(\"br-ovs\")\n\tinitFlows(\"br-ovs\")\n}\n\nfunc must(err error) {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc initBridge(bridge string) {\n\tmust(exec.Execute(context.Background(),\n\t\t\"ovs-vsctl\", \"--may-exist\", \"add-br\", bridge,\n\t\t\"--\", \"set-fail-mode\", bridge, \"secure\",\n\t))\n\n\tmust(exec.Execute(context.Background(),\n\t\t\"ip\", \"link\", \"set\", bridge, \"up\",\n\t))\n}\n\nfunc initFlows(bridge string) {\n\t// Table 0\n\tovs.MustAddFlow(bridge, \"table=0,in_port=1,actions=goto_table:1\")\n\tovs.MustAddFlow(bridge, \"table=0,in_port=2,actions=goto_table:2\")\n\tovs.MustAddFlow(bridge, \"table=0,in_port=3,actions=goto_table:3\")\n\tovs.MustAddFlow(bridge, \"table=0,in_port=4,actions=goto_table:4\")\n\tovs.MustAddFlow(bridge, \"table=0,priority=0,actions=drop\")\n\n\t// TODO ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgfone%2Fgo-ovs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxgfone%2Fgo-ovs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgfone%2Fgo-ovs/lists"}