-
Manuel Kieweg authoredManuel Kieweg authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
set.go 523 B
package cli
import (
"code.fbi.h-da.de/cocsn/gosdn/forks/goarista/gnmi"
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"context"
)
// Set sends a gNMI Set request to the specified target. Only one
// request per invocation supported.
func Set(a, u, p, typ string, args ...string) error {
opts := &nucleus.GnmiTransportOptions{
Config: gnmi.Config{
Addr: a,
Username: u,
Password: p,
},
}
t, err := nucleus.NewGnmiTransport(opts)
if err != nil {
return err
}
return t.Set(context.Background(), args)
}