Example #1
0
File: client.go Project: osrg/gobgp
func (cli *GoBGPClient) ReplaceStatement(t *table.Statement) error {
	a := api.NewAPIStatementFromTableStruct(t)
	_, err := cli.cli.ReplaceStatement(context.Background(), &api.ReplaceStatementRequest{
		Statement: a,
	})
	return err
}
Example #2
0
File: client.go Project: osrg/gobgp
func (cli *GoBGPClient) DeleteStatement(t *table.Statement, all bool) error {
	a := api.NewAPIStatementFromTableStruct(t)
	_, err := cli.cli.DeleteStatement(context.Background(), &api.DeleteStatementRequest{
		Statement: a,
		All:       all,
	})
	return err
}