Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openconfig/gnoigo
Go library implementing a gNOI client
https://github.com/openconfig/gnoigo
Last synced: about 2 months ago
JSON representation
Go library implementing a gNOI client
- Host: GitHub
- URL: https://github.com/openconfig/gnoigo
- Owner: openconfig
- License: apache-2.0
- Created: 2023-08-11T20:28:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-20T20:53:04.000Z (5 months ago)
- Last Synced: 2024-08-20T22:46:23.689Z (5 months ago)
- Language: Go
- Size: 85.9 KB
- Stars: 4
- Watchers: 5
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction
`gnoigo` is a go gNOI client library that provides convenience functions for
constructing and running gNOI operations.To build and execute the `gnoigo` unit tests, run the following:
```
go build ./...
go test ./...
```## Usage
Following is an example of how to use `gnoigo` API for performing a Ping
Operation which is present in the `System` module.* Create the `gnoigo` clients object.
```
conn, err := grpc.DialContext(ctx, "host")
if err != nil {
return err
}
clients := gnoigo.NewClients(conn)
```* Create the PingOperation object with inputs like source and destination.
```
pingOp := system.NewPingOperation().Destination("1.2.3.4").Source("5.6.7.8")
```* Call the Execute operation to perform the Ping operation.
```
response, err := gnoigo.Execute(ctx, clients, pingOp)
```In this example `response` will be of type `PingResponse`.