Skip to content
forked from openconfig/gnoigo

Go library implementing a gNOI client

License

Notifications You must be signed in to change notification settings

asafsonnv/gnoigo

This branch is 8 commits behind openconfig/gnoigo:main.

Folders and files

NameName
Last commit message
Last commit date
Oct 22, 2023
Oct 25, 2023
Sep 20, 2023
Oct 12, 2023
Feb 9, 2024
Sep 20, 2023
Aug 11, 2023
Sep 18, 2023
Sep 20, 2023
Mar 14, 2024
Mar 14, 2024

Repository files navigation

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.

About

Go library implementing a gNOI client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%