Skip to content

Commit b51fa6c

Browse files
authored
Merge pull request #4 from digitalocean/mdl-readme
README: add badges, add more information, example
2 parents 97c8f08 + 32acee6 commit b51fa6c

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
1-
go-openvswitch
1+
go-openvswitch [![Build Status](https://travis-ci.org/digitalocean/go-openvswitch.svg?branch=master)](https://travis-ci.org/digitalocean/go-openvswitch) [![GoDoc](https://godoc.org/github.com/digitalocean/go-openvswitch?status.svg)](https://godoc.org/github.com/digitalocean/go-openvswitch) [![Go Report Card](https://goreportcard.com/badge/github.com/digitalocean/go-openvswitch)](https://goreportcard.com/report/github.com/digitalocean/go-openvswitch)
22
==============
33

4-
Go packages which enable interacting with Open vSwitch. Apache 2.0 Licensed.
4+
Go packages which enable interacting with Open vSwitch. Apache 2.0 Licensed.
5+
6+
- `ovs`: Package ovs is a client library for Open vSwitch which enables programmatic control of the virtual switch.
7+
- `ovsnl`: Package ovsnl enables interaction with the Linux Open vSwitch generic netlink interface.
8+
9+
ovs
10+
---
11+
12+
Not yet open source; coming soon!
13+
14+
ovsnl
15+
-----
16+
17+
Package `ovsnl` allows you to utilize OvS's Linux generic netlink interface to
18+
pull data from the kernel. Here's an example:
19+
20+
```go
21+
// Dial a generic netlink connection and create a *ovsnl.Client.
22+
c, err := ovsnl.New()
23+
if err != nil {
24+
// If OVS generic netlink families aren't available, do nothing.
25+
if os.IsNotExist(err) {
26+
log.Printf("generic netlink OVS families not found: %v", err)
27+
return
28+
}
29+
30+
log.Fatalf("failed to create client %v", err)
31+
}
32+
// Be sure to close the generic netlink connection!
33+
defer c.Close()
34+
35+
// TODO(mdlayher): expand upon this example!
36+
```

0 commit comments

Comments
 (0)